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; see #10252, #10769 */ |
---|
76 | node[route], |
---|
77 | node[restriction] { |
---|
78 | throwWarning: 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[man_made=survey_point], |
---|
84 | way[power=transformer], |
---|
85 | way[power=pole], |
---|
86 | way[power=tower]!:closed, |
---|
87 | way[amenity=vending_machine], |
---|
88 | way[natural=peak], |
---|
89 | way[natural=saddle], |
---|
90 | way[natural=volcano], |
---|
91 | way[natural=tree] { |
---|
92 | throwWarning: tr("{0} on a way. Should be used on a node.", "{0.tag}"); |
---|
93 | } |
---|
94 | |
---|
95 | /* {0} on a way, should be a relation; see #10252 */ |
---|
96 | way[route=bus] { |
---|
97 | throwWarning: tr("{0} on a way. Should be used in a relation", "{0.tag}"); |
---|
98 | } |
---|
99 | |
---|
100 | /* see ticket:#10125 */ |
---|
101 | node[source:geometry] { |
---|
102 | throwWarning: tr("{0} on a node", "{0.key}"); |
---|
103 | fixChangeKey: "source:geometry => source:position"; |
---|
104 | } |
---|
105 | |
---|
106 | /* Building inside building (spatial test) */ |
---|
107 | *[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] ∈ |
---|
108 | *[building][building!~/no|entrance/] { |
---|
109 | throwWarning: tr("Building inside building"); |
---|
110 | } |
---|
111 | |
---|
112 | /* Overlapping areas (spatial test) */ |
---|
113 | area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] { |
---|
114 | set water_area; |
---|
115 | } |
---|
116 | |
---|
117 | /* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */ |
---|
118 | area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/] ⧉ area:closed:areaStyle.water_area, |
---|
119 | area:closed:areaStyle[landuse=reservoir] ⧉ area:closed:areaStyle.water_area { |
---|
120 | throwWarning: tr("Overlapping Water Areas"); |
---|
121 | } |
---|
122 | |
---|
123 | area:closed:areaStyle ⧉ area:closed:areaStyle { |
---|
124 | throwOther: tr("Overlapping Areas"); |
---|
125 | } |
---|
126 | |
---|
127 | /* see ticket #9311 */ |
---|
128 | node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] ∈ *[amenity=parking] { |
---|
129 | throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking"); |
---|
130 | } |
---|
131 | |
---|
132 | /* see ticket #9556 */ |
---|
133 | area:closed:areaStyle[tag("natural") = parent_tag("natural")] ⧉ area:closed:areaStyle[natural] { |
---|
134 | throwWarning: tr("Overlapping Identical Natural Areas"); |
---|
135 | } |
---|
136 | |
---|
137 | area:closed:areaStyle[tag("landuse") = parent_tag("landuse")] ⧉ area:closed:areaStyle[landuse] { |
---|
138 | throwWarning: tr("Overlapping Identical Landuses"); |
---|
139 | } |
---|
140 | |
---|
141 | /* see ticket:#9522 */ |
---|
142 | node[tag("amenity") = parent_tag("amenity")] ∈ *[amenity][amenity != parking] { |
---|
143 | throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity"))); |
---|
144 | } |
---|
145 | node[tag("leisure") = parent_tag("leisure")] ∈ *[leisure] { |
---|
146 | throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure"))); |
---|
147 | } |
---|
148 | node[tag("tourism") = parent_tag("tourism")] ∈ *[tourism] { |
---|
149 | throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism"))); |
---|
150 | } |
---|
151 | node[tag("shop") = parent_tag("shop")] ∈ *[shop] { |
---|
152 | throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop"))); |
---|
153 | } |
---|
154 | node[tag("power") = parent_tag("power")] ∈ *[power] { |
---|
155 | throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power"))); |
---|
156 | } |
---|
157 | |
---|
158 | /* isolated nodes which should be part of a way, see #10825 */ |
---|
159 | node:unconnected:in-downloaded-area[entrance], |
---|
160 | node:unconnected:in-downloaded-area[traffic_calming], |
---|
161 | node:unconnected:in-downloaded-area[highway=passing_place], |
---|
162 | node:unconnected:in-downloaded-area[highway=mini_roundabout], |
---|
163 | node:unconnected:in-downloaded-area[highway=motorway_junction], |
---|
164 | node:unconnected:in-downloaded-area[highway=turning_loop], |
---|
165 | node:unconnected:in-downloaded-area[highway=turning_circle], |
---|
166 | node:unconnected:in-downloaded-area[highway=stop], |
---|
167 | node:unconnected:in-downloaded-area[highway=give_way], |
---|
168 | node:unconnected:in-downloaded-area[highway=traffic_signals], |
---|
169 | node:unconnected:in-downloaded-area[highway=crossing], |
---|
170 | node:unconnected:in-downloaded-area[crossing], |
---|
171 | node:unconnected:in-downloaded-area[railway=crossing], |
---|
172 | node:unconnected:in-downloaded-area[railway=level_crossing], |
---|
173 | node:unconnected:in-downloaded-area[railway=buffer_stop], |
---|
174 | node:unconnected:in-downloaded-area[public_transport=stop_position], |
---|
175 | node:unconnected:in-downloaded-area[noexit], |
---|
176 | node:unconnected:in-downloaded-area[waterway=dam], |
---|
177 | node:unconnected:in-downloaded-area[waterway=weir], |
---|
178 | node:unconnected:in-downloaded-area[waterway=waterfall], |
---|
179 | node:unconnected:in-downloaded-area[amenity=ferry_terminal], |
---|
180 | node:unconnected:in-downloaded-area[mountain_pass=yes], |
---|
181 | node:unconnected:in-downloaded-area[barrier=gate], |
---|
182 | node:unconnected:in-downloaded-area[barrier=lift_gate], |
---|
183 | node:unconnected:in-downloaded-area[barrier=swing_gate], |
---|
184 | node:unconnected:in-downloaded-area[barrier=toll_booth], |
---|
185 | node:unconnected:in-downloaded-area[barrier=turnstile], |
---|
186 | node:unconnected:in-downloaded-area[barrier=full-height_turnstile], |
---|
187 | node:unconnected:in-downloaded-area[barrier=motorcycle_barrier], |
---|
188 | node:unconnected:in-downloaded-area[barrier=rope], |
---|
189 | node:unconnected:in-downloaded-area[barrier=sally_port], |
---|
190 | node:unconnected:in-downloaded-area[barrier=spikes], |
---|
191 | node:unconnected:in-downloaded-area[barrier=stile], |
---|
192 | node:unconnected:in-downloaded-area[barrier=sump_buster], |
---|
193 | node:unconnected:in-downloaded-area[barrier=kerb], |
---|
194 | node:unconnected:in-downloaded-area[barrier=border_control], |
---|
195 | node:unconnected:in-downloaded-area[barrier=bump_gate], |
---|
196 | node:unconnected:in-downloaded-area[barrier=bus_trap], |
---|
197 | node:unconnected:in-downloaded-area[barrier=cattle_grid], |
---|
198 | node:unconnected:in-downloaded-area[barrier=chain], |
---|
199 | node:unconnected:in-downloaded-area[barrier=cycle_barrier], |
---|
200 | node:unconnected:in-downloaded-area[barrier=hampshire_gate], |
---|
201 | node:unconnected:in-downloaded-area[barrier=height_restrictor], |
---|
202 | node:unconnected:in-downloaded-area[barrier=debris] { |
---|
203 | throwWarning: tr("{0} must be connected to a way", "{2.tag}"); |
---|
204 | } |
---|
205 | |
---|
206 | /*see #11127*/ |
---|
207 | way[railway][bridge] > node, |
---|
208 | way[highway][bridge] > node { |
---|
209 | set node_in_bridge; |
---|
210 | } |
---|
211 | way[waterway] > node.node_in_bridge { |
---|
212 | throwWarning: tr("node connects waterway and bridge"); |
---|
213 | } |
---|