1

How can I find list of cities from OSM in particular state or country?

Suppose I want to find all the cities in Gujarat state and bbox (boundry values) values of gujarat state can be found here http://nominatim.openstreetmap.org/search?q=gujarat&format=xml

So now using overpass API, how can find the list of cities in Gujarat? Please write the query for me. Or tell me any other solution without overpass, if some better solution is available.

asked 28 Jun '12, 08:36

Ravi%20Kotwani's gravatar image

Ravi Kotwani
136669
accept rate: 0%


One Answer:
2

If you already have the bounding box from your Nominatim query, and if what you are looking for are nodes tagged place=city, then it is probably easiest to use the XAPI compatibility mode of Overpass:

http://www.overpass-api.de/api/xapi?node[bbox=68.11,20.12,74.48,24.71][place=city]

Note that Overpass expects the bbox as west,south,east,north whereas Nominatim outputs it as south,north,east,west.

permanent link

answered 28 Jun '12, 09:13

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
73.3k866641137
accept rate: 24%

Thanks. I had already tried the same but I was writing the wrong sequence of bbox values. Thanks a lot. Its working find now.

(28 Jun '12, 09:50) Ravi Kotwani

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×591
×377
×294
×74

question asked: 28 Jun '12, 08:36

question was seen: 7,440 times

last updated: 28 Jun '12, 09:50

powered by OSQA