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