-
Notifications
You must be signed in to change notification settings - Fork 0
/
things_around_other_things
44 lines (38 loc) · 1004 Bytes
/
things_around_other_things
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[out:json][bbox:{{bbox}}][timeout:800];
// get set of foos
(
node[foofeature=footag]({{bbox}});
way[foofeature=footag]({{bbox}});
rel[foofeature=footag]({{bbox}});
)->.foo;
// get set of bars
(
node[barfeature=bartag]({{bbox}});
way[barfeature=bartag]({{bbox}});
rel[barfeature=bartag]({{bbox}});
)->.bar;
// get set of bazs
/// comment out for foos near bars only
(
node[bazfeature=baztag]({{bbox}});
way[bazfeature=baztag]({{bbox}});
rel[bazfeature=baztag]({{bbox}});
)->.baz;
// determine set of foos near bars
(
node.foo(around.bars:DISTANCE1);
way.foo(around.bars:DISTANCE1);
rel.foo(around.bars:DISTANCE1);
)->.foonearbar;
// determine set of bazs near foos near bars
/// comment out for foos near bars only
(
node.baz(around.foonearbar:DISTANCE2);
way.baz(around.foonearbar:DISTANCE2);
rel.baz(around.foonearbar:DISTANCE2);
)->.baznearfoonearbar;
// print
(.baz; - .baznearfoonearbar;);
/// for foos near bars only, run
///(.foo; -.foonearbar;);
out geom meta;