I want to generate the lists of states and cities (state wise cities) of Germany using overpass XAPI of OSM. In wiki I can see this list http://en.wikipedia.org/wiki/States_of_Germany and http://en.wikipedia.org/wiki/List_of_cities_in_Germany_by_population So according to wiki Germany has 16 states and 80 cities. Now, to fetch the list of states in Germany I am using this query: http://www.overpass-api.de/api/xapi?node[bbox=5.87,47.27,15.04,55.12][type=administrative] To fetch list of cities in Germany I am using this query: http://www.overpass-api.de/api/xapi?node[bbox=5.87,47.27,15.04,55.12][place=city] So from my above queries I am getting 0 states and 114 cities. Which is absolutely wrong according to wiki. Please guide me if I am writing wrong query? Or suggest me some another way to fetch the list of states and cities from OSM. asked 28 Jun '12, 10:39 Ravi Kotwani |
The states of Germany are all modeled as relations. You can get them (and a lot more) with a call like
Unfortunately, Germany doesn't fit very well into a single bounding box. For that reason you get a lot of other states into the result. The cities are more difficult. There is no reliable tagging of the number of inhabitants. It is a number that changes anyway every day, and tends to g. For example, the number of cities with more than 100,000 inhabitants is now probably closer to 90 than to 80. A more stable criterion are the "Kreisfreie Städte": these are cities big enough to have the administrative rank of a county. You can find them with
answered 29 Jun '12, 16:25 Roland Olbricht |
About the states: About the cities: answered 28 Jun '12, 16:27 Pieren |