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