Is it possible to get all city nodes within a country using the overpass api? Preferably using relations rather than a bounding box. If I have to do this using a bounding box, is it possible to get a country bounding box through the overpass api too? https://help.openstreetmap.org/questions/13872/how-to-find-list-of-cities-in-a-state-with-overpass-osm-api shows how to do this within a bounding box. I would rather do this using relations to get a more accurate list of cities (especially since overpass doesn't appear to return a bounding box for the country node to start with) asked 14 Jan '13, 04:32 rjmackay |
The following overpass query returns the list of all cities in Belgium: area[name="Belgiƫ - Belgique - Belgien"];(node[place="city"](area););out; You can replace the name with any country (or other administrative level) you want. Areas are explained here: http://wiki.openstreetmap.org/wiki/Overpass_API/Areas answered 14 Jan '13, 04:47 escada 1
Brilliant, thanks! Areas are what I need and what I'd missed in the docs.
(14 Jan '13, 04:55)
rjmackay
|