NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%


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 ♦
82.5k927201273
accept rate: 23%

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

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:

×689
×483
×362
×92

question asked: 28 Jun '12, 08:36

question was seen: 11,111 times

last updated: 28 Jun '12, 09:50

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum