Using coordinate and radius instead of a bounding box
Asked Answered
H

1

6

My current queries look like this:

[out:json]
[timeout:60]
;
(

relation
["type"="multipolygon"]
["landuse"~"brownfield|railway"]
(50.757310,6.054754,50.786730,6.111574);

way
["landuse"~"brownfield|railway"]
(50.757310,6.054754,50.786730,6.111574);

);
out body;
>;
out skel qt;

I would like to replace the bounding box by one coordinate and a radius, similiar to querying nodes around another node.

node["name"="Bonn"];
node
  (around:1000)
  ["name"="Gielgen"];
out body;

Is this possible?

Hasin answered 17/9, 2015 at 9:30 Comment(0)
T
10

I was able to accomplish that using (around:radius,lat,lon). The radius appears to be given in meters.

A simple example:

node(around:1000.0,50.75,6.05)["historic"="wayside_cross"];
out;

Applied to your query:

[out:json]
[timeout:60]
;
(

relation
(around:1000,50.77675,6.07456)
["type"="multipolygon"]
["landuse"~"brownfield|railway"];

way
(around:1000,50.77675,6.07456)
["landuse"~"brownfield|railway"];

);
out body;
>;
out skel qt;
Towland answered 22/1, 2016 at 18:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.