Why not ask your question on the new OpenStreetMap Community Forum?

The thing is I need to know that both moves away from a city and that both approaches another, but the search just gives me the data where it is, I need to do this search the names of the two nearest cities.


How do I do this query?

asked 30 Oct '12, 22:29

diegoug's gravatar image

accept rate: 0%

Nominatim is an address search engine and not really suited for your purpose. You are looking for another kind of search and Overpass API seems to fit a lot better.

Take a look at this example query for all place nodes in the area you mentioned:


Note that this query only searches for nodes, you want to search for ways, too, to find every city. If the query doesn't return anything for a specific area, try increasing the given bounding box. You can also choose a different output format, just take a look at the documentation and the examples.

permanent link

answered 31 Oct '12, 14:56

scai's gravatar image

scai ♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 30 Oct '12, 22:29

question was seen: 17,733 times

last updated: 31 Oct '12, 14:56

powered by OSQA