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