Örom Loidl
Örom Loidl

Reputation: 386

Overpass: Search for POIs in a given perimeter

Using overpass-turbo.eu I want to query different types of elements near a certain point. Here's an example which returns all trees 150 meters around Big Ben in London.

[out:json][timeout:25];
( 
  node[name="Big Ben"]["addr:street"="Bridge Street"];
  node(around:150)[natural=tree];
);

out body;
>;
out skel qt;

It works for all trees. But what if I for example also want to find all shops 150 meters from Big Ben? Due to overpass' flow concept, I can use the Big Ben node only for the query next to the line where I've queried for Big Ben.

What I may need to do is to store Big Ben's node in a variable to access it for all queries following. How does this work?

Upvotes: 1

Views: 1285

Answers (1)

Örom Loidl
Örom Loidl

Reputation: 386

Simply use the following Overpass syntax:

(around:radius,latitude,longitude)

In this case:

node(around:150, 51.50069, -0.12458)[natural=tree];

Upvotes: 2

Related Questions