1

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.

http://nominatim.openstreetmap.org/search?q=co+4.17897295000,-73.70788536667&format=xml&addressdetails=1

How do I do this query?

asked 30 Oct '12, 22:29

diegoug's gravatar image

diegoug
26112
accept rate: 0%


One Answer:
2

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:

http://overpass-api.de/api/interpreter?data=[out:json];node["place"](4.14,-73.73,4.21,-73.67);out;

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 ♦
31.9k20291442
accept rate: 23%

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
×585
×294
×126
×95

question asked: 30 Oct '12, 22:29

question was seen: 13,780 times

last updated: 31 Oct '12, 14:56

powered by OSQA