1 | /* {0} on a node, should be a way */
|
---|
2 | node[oneway],
|
---|
3 | node[bridge],
|
---|
4 | node[sidewalk],
|
---|
5 | node[footway],
|
---|
6 | node[man_made=embankment],
|
---|
7 | node[man_made=groyne],
|
---|
8 | node[man_made=cutline],
|
---|
9 | node[power=line],
|
---|
10 | node[cutline],
|
---|
11 | node[aerialway=cable_car],
|
---|
12 | node[aerialway=gondola],
|
---|
13 | node[aerialway=chair_lift],
|
---|
14 | node[aerialway=mixed_lift],
|
---|
15 | node[aerialway=drag_lift],
|
---|
16 | node[aerialway=t-bar],
|
---|
17 | node[aerialway=j-bar],
|
---|
18 | node[aerialway=platter],
|
---|
19 | node[aerialway=magic_carpet],
|
---|
20 | node[aerialway=rope_tow],
|
---|
21 | node[aerialway=goods],
|
---|
22 | node[aeroway=taxiway],
|
---|
23 | node[aeroway=runway],
|
---|
24 | node[railway=rail],
|
---|
25 | node[railway=narrow_gauge],
|
---|
26 | node[railway=monorail],
|
---|
27 | node[railway=preserved],
|
---|
28 | node[railway=light_rail],
|
---|
29 | node[railway=subway],
|
---|
30 | node[railway=tram],
|
---|
31 | node[railway=disused],
|
---|
32 | node[railway=abandoned],
|
---|
33 | node[waterway=river],
|
---|
34 | node[waterway=canal],
|
---|
35 | node[waterway=stream],
|
---|
36 | node[waterway=ditch],
|
---|
37 | node[waterway=drain],
|
---|
38 | node[natural=coastline],
|
---|
39 | node[natural=ridge],
|
---|
40 | node[natural=valley],
|
---|
41 | node[natural=tree_row] {
|
---|
42 | throwWarning: tr("{0} on a node. Should be used on a way.", "{0.tag}");
|
---|
43 | assertMatch: "node oneway=-1";
|
---|
44 | assertNoMatch: "way oneway=-1";
|
---|
45 | assertMatch: "node bridge=yes";
|
---|
46 | assertMatch: "node bridge=viaduct";
|
---|
47 | }
|
---|
48 |
|
---|
49 | /* {0} on a node, should be an area; see ticket #10679 */
|
---|
50 | node[landuse],
|
---|
51 | node[natural=scree],
|
---|
52 | node[natural=scrub],
|
---|
53 | node[natural=fell],
|
---|
54 | node[natural=heath],
|
---|
55 | node[natural=wood],
|
---|
56 | node[natural=grassland],
|
---|
57 | node[natural=wetland],
|
---|
58 | node[natural=water],
|
---|
59 | node[natural=mud],
|
---|
60 | node[natural=beach],
|
---|
61 | node[natural=sand],
|
---|
62 | node[natural=wood],
|
---|
63 | node[natural=bare_rock],
|
---|
64 | node[natural=glacier],
|
---|
65 | node[waterway=riverbank],
|
---|
66 | node[man_made=bridge],
|
---|
67 | node[man_made=breakwater],
|
---|
68 | node[aeroway=apron],
|
---|
69 | node[power=plant],
|
---|
70 | node[building:part],
|
---|
71 | node[source:outline] {
|
---|
72 | throwWarning: tr("{0} on a node. Should be drawn as an area.", "{0.tag}");
|
---|
73 | }
|
---|
74 |
|
---|
75 | /* {0} on a node, should be a relation; Error level; see #10252, #10769 */
|
---|
76 | node[route],
|
---|
77 | node[restriction] {
|
---|
78 | throwError: tr("{0}=* on a node. Should be used in a relation", "{0.key}");
|
---|
79 | }
|
---|
80 |
|
---|
81 | /* {0} on a way, should be a node */
|
---|
82 | way[entrance],
|
---|
83 | way[railway=subway_entrance],
|
---|
84 | way[man_made=survey_point],
|
---|
85 | way[aeroway=holding_position],
|
---|
86 | way[power=transformer],
|
---|
87 | way[power=pole],
|
---|
88 | way[power=tower]!:closed,
|
---|
89 | way[amenity=vending_machine],
|
---|
90 | way[natural=peak],
|
---|
91 | way[natural=saddle],
|
---|
92 | way[natural=volcano],
|
---|
93 | way[natural=tree] {
|
---|
94 | throwWarning: tr("{0} on a way. Should be used on a node.", "{0.tag}");
|
---|
95 | }
|
---|
96 |
|
---|
97 | /* {0} on a way, should be a relation; see #10252 */
|
---|
98 | way[route=bus] {
|
---|
99 | throwWarning: tr("{0} on a way. Should be used in a relation", "{0.tag}");
|
---|
100 | }
|
---|
101 |
|
---|
102 | /* #12502 */
|
---|
103 | node[leisure=park][natural=tree] {
|
---|
104 | throwWarning: tr("{0} together with {1} on a node. Remove {0}.", "{0.tag}", "{1.tag}");
|
---|
105 | group: tr("suspicious tag combination");
|
---|
106 | fixRemove: "leisure";
|
---|
107 | }
|
---|
108 | node[leisure=park][natural!=tree] {
|
---|
109 | throwWarning: tr("{0} on a node. Should be drawn as an area.", "{0.tag}");
|
---|
110 | }
|
---|
111 |
|
---|
112 | /* see ticket:#10125 */
|
---|
113 | node[source:geometry] {
|
---|
114 | throwWarning: tr("{0} on a node", "{0.key}");
|
---|
115 | fixChangeKey: "source:geometry => source:position";
|
---|
116 | }
|
---|
117 |
|
---|
118 | /* Building inside building (spatial test) */
|
---|
119 | *[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] ∈
|
---|
120 | *[building][building!~/no|entrance/] {
|
---|
121 | throwWarning: tr("Building inside building");
|
---|
122 | }
|
---|
123 |
|
---|
124 | /* Overlapping areas (spatial test) */
|
---|
125 | area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] {
|
---|
126 | set water_area;
|
---|
127 | }
|
---|
128 |
|
---|
129 | /* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */
|
---|
130 | area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/] ⧉ area:closed:areaStyle.water_area,
|
---|
131 | area:closed:areaStyle[landuse=reservoir] ⧉ area:closed:areaStyle.water_area {
|
---|
132 | throwWarning: tr("Overlapping Water Areas");
|
---|
133 | }
|
---|
134 |
|
---|
135 | area:closed:areaStyle ⧉ area:closed:areaStyle {
|
---|
136 | throwOther: tr("Overlapping Areas");
|
---|
137 | }
|
---|
138 |
|
---|
139 | /* see ticket #9311 */
|
---|
140 | node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] ∈ *[amenity=parking] {
|
---|
141 | throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
|
---|
142 | }
|
---|
143 |
|
---|
144 | /* see ticket #9556 */
|
---|
145 | area:closed:areaStyle[tag("natural") = parent_tag("natural")] ⧉ area:closed:areaStyle[natural] {
|
---|
146 | throwWarning: tr("Overlapping Identical Natural Areas");
|
---|
147 | }
|
---|
148 |
|
---|
149 | area:closed:areaStyle[tag("landuse") = parent_tag("landuse")] ⧉ area:closed:areaStyle[landuse] {
|
---|
150 | throwWarning: tr("Overlapping Identical Landuses");
|
---|
151 | }
|
---|
152 |
|
---|
153 | /* see ticket:#9522 */
|
---|
154 | node[tag("amenity") = parent_tag("amenity")] ∈ *[amenity][amenity != parking] {
|
---|
155 | throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity")));
|
---|
156 | group: tr("{0} inside {1}", "amenity", "amenity");
|
---|
157 | }
|
---|
158 | node[tag("leisure") = parent_tag("leisure")] ∈ *[leisure] {
|
---|
159 | throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure")));
|
---|
160 | group: tr("{0} inside {1}", "leisure", "leisure");
|
---|
161 | }
|
---|
162 | node[tag("tourism") = parent_tag("tourism")] ∈ *[tourism] {
|
---|
163 | throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism")));
|
---|
164 | group: tr("{0} inside {1}", "tourism", "tourism");
|
---|
165 | }
|
---|
166 | node[tag("shop") = parent_tag("shop")] ∈ *[shop] {
|
---|
167 | throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop")));
|
---|
168 | group: tr("{0} inside {1}", "shop", "shop");
|
---|
169 | }
|
---|
170 | node[tag("power") = parent_tag("power")] ∈ *[power] {
|
---|
171 | throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
|
---|
172 | group: tr("{0} inside {1}", "power", "power");
|
---|
173 | }
|
---|
174 |
|
---|
175 | /* isolated nodes which should be part of a way, see #10825 */
|
---|
176 | node:unconnected:in-downloaded-area[entrance],
|
---|
177 | node:unconnected:in-downloaded-area[traffic_calming],
|
---|
178 | node:unconnected:in-downloaded-area[highway=passing_place],
|
---|
179 | node:unconnected:in-downloaded-area[highway=mini_roundabout],
|
---|
180 | node:unconnected:in-downloaded-area[highway=motorway_junction],
|
---|
181 | node:unconnected:in-downloaded-area[highway=turning_loop],
|
---|
182 | node:unconnected:in-downloaded-area[highway=turning_circle],
|
---|
183 | node:unconnected:in-downloaded-area[highway=stop],
|
---|
184 | node:unconnected:in-downloaded-area[highway=give_way],
|
---|
185 | node:unconnected:in-downloaded-area[highway=traffic_signals],
|
---|
186 | node:unconnected:in-downloaded-area[highway=crossing],
|
---|
187 | node:unconnected:in-downloaded-area[crossing],
|
---|
188 | node:unconnected:in-downloaded-area[railway=crossing],
|
---|
189 | node:unconnected:in-downloaded-area[railway=level_crossing],
|
---|
190 | node:unconnected:in-downloaded-area[railway=buffer_stop],
|
---|
191 | node:unconnected:in-downloaded-area[public_transport=stop_position],
|
---|
192 | node:unconnected:in-downloaded-area[aeroway=holding_position],
|
---|
193 | node:unconnected:in-downloaded-area[noexit],
|
---|
194 | node:unconnected:in-downloaded-area[waterway=dam],
|
---|
195 | node:unconnected:in-downloaded-area[waterway=weir],
|
---|
196 | node:unconnected:in-downloaded-area[waterway=waterfall],
|
---|
197 | node:unconnected:in-downloaded-area[amenity=ferry_terminal],
|
---|
198 | node:unconnected:in-downloaded-area[leisure=slipway],
|
---|
199 | node:unconnected:in-downloaded-area[mountain_pass=yes],
|
---|
200 | node:unconnected:in-downloaded-area[barrier=gate],
|
---|
201 | node:unconnected:in-downloaded-area[barrier=lift_gate],
|
---|
202 | node:unconnected:in-downloaded-area[barrier=swing_gate],
|
---|
203 | node:unconnected:in-downloaded-area[barrier=toll_booth],
|
---|
204 | node:unconnected:in-downloaded-area[barrier=turnstile],
|
---|
205 | node:unconnected:in-downloaded-area[barrier=full-height_turnstile],
|
---|
206 | node:unconnected:in-downloaded-area[barrier=motorcycle_barrier],
|
---|
207 | node:unconnected:in-downloaded-area[barrier=rope],
|
---|
208 | node:unconnected:in-downloaded-area[barrier=sally_port],
|
---|
209 | node:unconnected:in-downloaded-area[barrier=spikes],
|
---|
210 | node:unconnected:in-downloaded-area[barrier=stile],
|
---|
211 | node:unconnected:in-downloaded-area[barrier=sump_buster],
|
---|
212 | node:unconnected:in-downloaded-area[barrier=kerb],
|
---|
213 | node:unconnected:in-downloaded-area[barrier=border_control],
|
---|
214 | node:unconnected:in-downloaded-area[barrier=bump_gate],
|
---|
215 | node:unconnected:in-downloaded-area[barrier=bus_trap],
|
---|
216 | node:unconnected:in-downloaded-area[barrier=cattle_grid],
|
---|
217 | node:unconnected:in-downloaded-area[barrier=chain],
|
---|
218 | node:unconnected:in-downloaded-area[barrier=cycle_barrier],
|
---|
219 | node:unconnected:in-downloaded-area[barrier=hampshire_gate],
|
---|
220 | node:unconnected:in-downloaded-area[barrier=height_restrictor],
|
---|
221 | node:unconnected:in-downloaded-area[barrier=debris] {
|
---|
222 | throwWarning: tr("{0}", "{2.tag}");
|
---|
223 | group: tr("isolated node which must be connected to a way");
|
---|
224 | }
|
---|
225 |
|
---|
226 | /* #11127 */
|
---|
227 | way[railway][bridge] > node,
|
---|
228 | way[highway][bridge] > node {
|
---|
229 | set node_in_bridge;
|
---|
230 | }
|
---|
231 | way[waterway] > node.node_in_bridge {
|
---|
232 | throwWarning: tr("node connects waterway and bridge");
|
---|
233 | }
|
---|
234 |
|
---|
235 | /* #11128 */
|
---|
236 | way[highway] > node[tourism=information][information=guidepost] {
|
---|
237 | set guidepost;
|
---|
238 | throwOther: tr("{0} node connected to a highway", "{1.tag}");
|
---|
239 | }
|
---|
240 | way[highway] > node[amenity][!entrance][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking|bus_station|car_wash|ferry_terminal)$/],
|
---|
241 | way[highway] > node[building][!entrance],
|
---|
242 | way[highway] > node[leisure][!entrance][leisure!=slipway],
|
---|
243 | way[highway] > node[office][!entrance],
|
---|
244 | way[highway] > node[shop][!entrance],
|
---|
245 | way[highway] > node[tourism][!entrance][tourism!=viewpoint]!.guidepost {
|
---|
246 | throwWarning: tr("{0} node connected to a highway", "{0.key}");
|
---|
247 | }
|
---|
248 |
|
---|
249 | way[junction=roundabout]:righthandtraffic:clockwise,
|
---|
250 | way[junction=roundabout]!:righthandtraffic:anticlockwise {
|
---|
251 | throwWarning: tr("suspicious roundabout direction");
|
---|
252 | }
|
---|
253 |
|
---|
254 | /* #12496 */
|
---|
255 | area:closed[place=islet][eval(areasize()) > 1500000] {
|
---|
256 | throwWarning: tr("{0} on a large area", "{1.tag}");
|
---|
257 | suggestAlternative: "place=island";
|
---|
258 | fixAdd: "place=island";
|
---|
259 | }
|
---|
260 |
|
---|
261 | area:closed[place=island][eval(areasize()) < 500000] {
|
---|
262 | throwWarning: tr("{0} on a small area", "{1.tag}");
|
---|
263 | suggestAlternative: "place=islet";
|
---|
264 | fixAdd: "place=islet";
|
---|
265 | }
|
---|
266 |
|
---|
267 | /* #12561 - building larger than Aalsmeer Flower Auction (518000) and Tesla factory (510000) */
|
---|
268 | area:closed[building][building!=no][eval(areasize()) > 520000] {
|
---|
269 | throwError: tr("Too large building");
|
---|
270 | }
|
---|
271 |
|
---|
272 | /* #12577 */
|
---|
273 | way[power=line] > node,
|
---|
274 | way[power=minor_line] > node,
|
---|
275 | way[power=cable] > node {
|
---|
276 | set node_in_power_way;
|
---|
277 | }
|
---|
278 | way[!power][!building] > node.node_in_power_way {
|
---|
279 | throwWarning: tr("Node connects a power line or cable with an object which is not related to the power infrastructure.");
|
---|
280 | }
|
---|
281 |
|
---|
282 | /* #12646, #12992 */
|
---|
283 | way[waterway=~/^(stream|ditch|river|drain)$/]!:closed >[index=-1] node[natural!=sinkhole][natural!=cave_entrance]!:connection:in-downloaded-area {
|
---|
284 | throwWarning: tr("Waterway ends without a connection to another waterway or the direction of the waterway is wrong.");
|
---|
285 | }
|
---|
286 |
|
---|
287 | /* #10717 */
|
---|
288 | way[natural=coastline] ∈ area[natural=water],
|
---|
289 | way[natural=coastline] ∈ area[waterway=riverbank] {
|
---|
290 | throwError: tr("Coastline inside {1}", "{0.tag}");
|
---|
291 | }
|
---|
292 |
|
---|
293 | /* #10471 */
|
---|
294 | way[waterway] > node[ford?] { set ford_on_waterway; }
|
---|
295 | way[highway] > node[ford?] { set ford_on_highway; }
|
---|
296 | node[ford?]:in-downloaded-area!.ford_on_waterway, node[ford?]:in-downloaded-area!.ford_on_highway {
|
---|
297 | throwWarning: tr("{0} should be on the node where {1} and {2} intersect", "ford", "highway", "waterway");
|
---|
298 | }
|
---|