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