H4kor
H4kor

Reputation: 1562

Using coordinate and radius instead of a bounding box

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?

Upvotes: 6

Views: 2333

Answers (1)

chrki
chrki

Reputation: 6323

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;

Upvotes: 10

Related Questions