Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get point of interest near my point using overpass-api?

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 ?

like image 576
Mykyta Karpyshyn Avatar asked May 08 '13 13:05

Mykyta Karpyshyn


People also ask

How do I query overpass API?

To query the server from an application, GET from https://overpass-api.de/api/interpreter?data= , followed by your request (the same you would type into overpass turbo, just without line breaks). It is also possible to host an overpass instance on your own.

How do you query an overpass on a turbo?

Click the green run button to try the query against the live database. Your browser will open up a new page, loading the query and the description into the Overpass Turbo IDE. The query will run automatically so you can see the results. Many of the queries include commented out sections marked as //TRYME .


1 Answers

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!

like image 187
tyr Avatar answered Oct 01 '22 19:10

tyr