1 | /* {0} on a node, should be a way */
|
---|
2 | node[oneway],
|
---|
3 | node[bridge?],
|
---|
4 | node[sidewalk],
|
---|
5 | node[footway],
|
---|
6 | node[aerialway=cable_car],
|
---|
7 | node[aerialway=gondola],
|
---|
8 | node[aerialway=chair_lift],
|
---|
9 | node[aerialway=mixed_lift],
|
---|
10 | node[aerialway=drag_lift],
|
---|
11 | node[aerialway=t-bar],
|
---|
12 | node[aerialway=j-bar],
|
---|
13 | node[aerialway=platter],
|
---|
14 | node[aerialway=magic_carpet],
|
---|
15 | node[aerialway=rope_tow],
|
---|
16 | node[aerialway=goods],
|
---|
17 | node[waterway=river],
|
---|
18 | node[waterway=riverbank],
|
---|
19 | node[waterway=canal],
|
---|
20 | node[waterway=wadi],
|
---|
21 | node[waterway=stream],
|
---|
22 | node[waterway=ditch],
|
---|
23 | node[natural=coastline],
|
---|
24 | node[natural=ridge],
|
---|
25 | node[natural=tree_row] {
|
---|
26 | throwWarning: tr("{0} on a node. Should be used on a way.", "{0.key}");
|
---|
27 | assertMatch: "node oneway=-1";
|
---|
28 | assertNoMatch: "way oneway=-1";
|
---|
29 | assertMatch: "node bridge=yes";
|
---|
30 | assertNoMatch: "node bridge=13";
|
---|
31 | }
|
---|
32 |
|
---|
33 | /* {0} on a node, should be an area; see ticket #10679 */
|
---|
34 | node[landuse],
|
---|
35 | node[natural=scree],
|
---|
36 | node[natural=scrub],
|
---|
37 | node[natural=fell],
|
---|
38 | node[natural=heath],
|
---|
39 | node[natural=wood],
|
---|
40 | node[natural=grassland],
|
---|
41 | node[natural=wetland],
|
---|
42 | node[natural=water],
|
---|
43 | node[natural=mud],
|
---|
44 | node[natural=beach],
|
---|
45 | node[natural=sand],
|
---|
46 | node[natural=wood],
|
---|
47 | node[natural=bare_rock],
|
---|
48 | node[waterway=riverbank],
|
---|
49 | node[source:outline] {
|
---|
50 | throwWarning: tr("{0} on a node. Should be drawn as an area.", "{0.tag}");
|
---|
51 | }
|
---|
52 |
|
---|
53 | /* {0} on a node, should be a relation; see #10252, #10769 */
|
---|
54 | node[route],
|
---|
55 | node[restriction] {
|
---|
56 | throwWarning: tr("{0}=* on a node. Should be used in a relation", "{0.key}");
|
---|
57 | }
|
---|
58 |
|
---|
59 | /* {0} on a way, should be a relation; see #10252 */
|
---|
60 | way[route=bus] {
|
---|
61 | throwWarning: tr("{0} on a way. Should be used in a relation", "{0.tag}");
|
---|
62 | }
|
---|
63 |
|
---|
64 | /* see ticket:#10125 */
|
---|
65 | node[source:geometry] {
|
---|
66 | throwWarning: tr("{0} on a node", "{0.key}");
|
---|
67 | fixChangeKey: "source:geometry => source:position";
|
---|
68 | }
|
---|
69 |
|
---|
70 | /* Building inside building (spatial test) */
|
---|
71 | *[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] ∈
|
---|
72 | *[building][building!~/no|entrance/] {
|
---|
73 | throwWarning: tr("Building inside building");
|
---|
74 | }
|
---|
75 |
|
---|
76 | /* Overlapping areas (spatial test) */
|
---|
77 | area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] {
|
---|
78 | set water_area;
|
---|
79 | }
|
---|
80 |
|
---|
81 | /* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */
|
---|
82 | area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/] ⧉ area:closed:areaStyle.water_area,
|
---|
83 | area:closed:areaStyle[landuse=reservoir] ⧉ area:closed:areaStyle.water_area {
|
---|
84 | throwWarning: tr("Overlapping Water Areas");
|
---|
85 | }
|
---|
86 |
|
---|
87 | area:closed:areaStyle ⧉ area:closed:areaStyle {
|
---|
88 | throwOther: tr("Overlapping Areas");
|
---|
89 | }
|
---|
90 |
|
---|
91 | /* see ticket #9311 */
|
---|
92 | node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] ∈ *[amenity=parking] {
|
---|
93 | throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
|
---|
94 | }
|
---|
95 |
|
---|
96 | /* see ticket #9556 */
|
---|
97 | area:closed:areaStyle[tag("natural") = parent_tag("natural")] ⧉ area:closed:areaStyle[natural] {
|
---|
98 | throwWarning: tr("Overlapping Identical Natural Areas");
|
---|
99 | }
|
---|
100 |
|
---|
101 | area:closed:areaStyle[tag("landuse") = parent_tag("landuse")] ⧉ area:closed:areaStyle[landuse] {
|
---|
102 | throwWarning: tr("Overlapping Identical Landuses");
|
---|
103 | }
|
---|
104 |
|
---|
105 | /* see ticket:#9522 */
|
---|
106 | node[tag("amenity") = parent_tag("amenity")] ∈ *[amenity][amenity != parking] {
|
---|
107 | throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity")));
|
---|
108 | }
|
---|
109 | node[tag("leisure") = parent_tag("leisure")] ∈ *[leisure] {
|
---|
110 | throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure")));
|
---|
111 | }
|
---|
112 | node[tag("tourism") = parent_tag("tourism")] ∈ *[tourism] {
|
---|
113 | throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism")));
|
---|
114 | }
|
---|
115 | node[tag("shop") = parent_tag("shop")] ∈ *[shop] {
|
---|
116 | throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop")));
|
---|
117 | }
|
---|
118 | node[tag("power") = parent_tag("power")] ∈ *[power] {
|
---|
119 | throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
|
---|
120 | }
|
---|
121 |
|
---|
122 | /* isolated nodes which should be part of a way, see #10825 */
|
---|
123 | node:unconnected[entrance],
|
---|
124 | node:unconnected[traffic_calming],
|
---|
125 | node:unconnected[highway=passing_place],
|
---|
126 | node:unconnected[highway=mini_roundabout],
|
---|
127 | node:unconnected[highway=motorway_junction],
|
---|
128 | node:unconnected[highway=turning_loop],
|
---|
129 | node:unconnected[highway=turning_circle],
|
---|
130 | node:unconnected[highway=stop],
|
---|
131 | node:unconnected[highway=give_way],
|
---|
132 | node:unconnected[highway=traffic_signals],
|
---|
133 | node:unconnected[highway=crossing],
|
---|
134 | node:unconnected[crossing],
|
---|
135 | node:unconnected[railway=crossing],
|
---|
136 | node:unconnected[railway=level_crossing],
|
---|
137 | node:unconnected[railway=buffer_stop],
|
---|
138 | node:unconnected[public_transport=stop_position],
|
---|
139 | node:unconnected[noexit],
|
---|
140 | node:unconnected[waterway=dam],
|
---|
141 | node:unconnected[waterway=weir],
|
---|
142 | node:unconnected[waterway=waterfall],
|
---|
143 | node:unconnected[amenity=ferry_terminal],
|
---|
144 | node:unconnected[mountain_pass=yes],
|
---|
145 | node:unconnected[barrier=gate],
|
---|
146 | node:unconnected[barrier=lift_gate],
|
---|
147 | node:unconnected[barrier=swing_gate],
|
---|
148 | node:unconnected[barrier=toll_booth],
|
---|
149 | node:unconnected[barrier=turnstile],
|
---|
150 | node:unconnected[barrier=full-height_turnstile],
|
---|
151 | node:unconnected[barrier=motorcycle_barrier],
|
---|
152 | node:unconnected[barrier=rope],
|
---|
153 | node:unconnected[barrier=sally_port],
|
---|
154 | node:unconnected[barrier=spikes],
|
---|
155 | node:unconnected[barrier=stile],
|
---|
156 | node:unconnected[barrier=sump_buster],
|
---|
157 | node:unconnected[barrier=kerb],
|
---|
158 | node:unconnected[barrier=border_control],
|
---|
159 | node:unconnected[barrier=bump_gate],
|
---|
160 | node:unconnected[barrier=bus_trap],
|
---|
161 | node:unconnected[barrier=cattle_grid],
|
---|
162 | node:unconnected[barrier=chain],
|
---|
163 | node:unconnected[barrier=cycle_barrier],
|
---|
164 | node:unconnected[barrier=hampshire_gate],
|
---|
165 | node:unconnected[barrier=height_restrictor],
|
---|
166 | node:unconnected[barrier=debris] {
|
---|
167 | throwWarning: tr("{0} must be connected to a way", "{1.tag}");
|
---|
168 | }
|
---|