This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

Overpass API: Find something else than points (node)

0

Hello I have a query which works great for playgrounds that are points:

node["name"="Les Ulis"];
node
  (around:5000)
  ["leisure"="playground"];
out body;

But it does not work when the playgrounds are shape, like square. How could I do that? thank you

asked 03 Jul '15, 10:17

bodtx's gravatar image

bodtx
56226
accept rate: 0%

edited 03 Jul '15, 11:04

scai's gravatar image

scai ♦
33.3k21309459


One Answer:

2

Ok answer are in the ways :)

node["name"="Bures-sur-Yvette"];
(
way
  (around:5000)
  ["leisure"="playground"];
node
  (around:5000)
  ["leisure"="playground"];
  );
(._;>;);
out body;

answered 03 Jul '15, 10:35

bodtx's gravatar image

bodtx
56226
accept rate: 0%

3

You might also want to include relations.

(03 Jul '15, 11:10) joost schouppe
4

Please note that your query does not behave like you think it does. node(around:5000)... in your case will find all nodes, which are up to 5000m away from all ways, which in turn are up to 5000m away from Bures-sur-Yvette. Obviously, this will return nodes, which are much further away from Bures-sur-Yvette than 5000m. To fix this, use the following: http://overpass-turbo.eu/s/afS

(04 Jul '15, 09:00) mmd