6

I am using Overpass API.

I have an issue to find some points of interest (cafes, hospitals, schools) near (around in 100-200 miles) my point. I have only latitude and longitude.

Overpass API gives opportunity to get POIs using your place name. But I don't have it. I have only coordinates.

How can I do that ?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
Mykyta Karpyshyn
  • 198
  • 2
  • 13

1 Answers1

9

Use the around statement!

<query type="node">
  <around lat="..." lon="..." radius="..."/>
  <has-kv k="amenity" v="cafe" />
</query>
<print />

Try this example on overpass turbo!

tyr
  • 1,779
  • 1
  • 15
  • 15
  • Can you please help with one more issue. How to set several keys & values. For example I need amenity cafe and bank. And also "historic" keys with value f.e. "battlefield" ? So in the result I need cafes, banks and battlefields. Thanks – Mykyta Karpyshyn May 12 '13 at 14:58
  • 3
    _Logic or_ for a particular key is best done with a little trick: use a [regular expression](http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#One_or_another_name) like ``. _Logic or_ for different keys has to be done by ``ing multiple ``s. Like in this [example](http://overpass-turbo.eu/s/9L). – tyr May 12 '13 at 22:02