1 | /* Rules partially derived from Taginfo statistics - see ticket #5017
|
---|
2 | * Taginfo query: select keypairs.key1, keypairs.key2, keypairs.count_all, keys.count_all, cast(keypairs.count_all as real)/keys.count_all as from_fraction_all from keys, keypairs where key1='waterway' and keys.key=keypairs.key2 and (key1<>'highway' or keypairs.count_all>12000) and (key1<>'railway' or keypairs.count_all>3000) and (key1<>'waterway' or keypairs.count_all>800) and key2 not like '%:%' and from_fraction_all>0.97 and 1 union select keypairs.key2, keypairs.key1, keypairs.count_all, keys.count_all, cast(keypairs.count_all as real)/keys.count_all as from_fraction_all from keys, keypairs where key2='waterway' and keys.key=keypairs.key1 and (key2<>'highway' or keypairs.count_all>12000) and (key2<>'railway' or keypairs.count_all>3000) and (key2<>'waterway' or keypairs.count_all>800) and key1 not like '%:%' and from_fraction_all>0.97 and 1 order by keypairs.count_all desc limit 1000;
|
---|
3 | */
|
---|
4 |
|
---|
5 | way[surface=~/^(unpaved|compacted|gravel|fine_gravel|pebblestone|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$/] { /* without grass_paver as it is controversial */
|
---|
6 | set unpaved_surface;
|
---|
7 | }
|
---|
8 |
|
---|
9 | /* {0.key} without {1.key} (warning level) */
|
---|
10 | way[junction ][!highway][junction!=yes][!area:highway],
|
---|
11 | way[living_street ][!highway],
|
---|
12 | way[maintenance ][!highway],
|
---|
13 | way[median ][!highway],
|
---|
14 | way[motorroad ][!highway],
|
---|
15 | node[ntd_id ][!highway],
|
---|
16 | way[sac_scale ][!highway],
|
---|
17 | way[sidewalk ][!highway],
|
---|
18 | way[step_count ][!highway][man_made!=tower],
|
---|
19 | way[tracktype ][!highway],
|
---|
20 | way[trail_visibility ][!highway], /* #15029 */
|
---|
21 | way[trolley_wire ][!highway],
|
---|
22 | way[zip_left ][!highway],
|
---|
23 | way[zip_right ][!highway],
|
---|
24 | way[detail ][!railway][route!=railway],
|
---|
25 | way[eddy_current_brake ][!railway][route!=railway],
|
---|
26 | way[electrified ][!railway][route!=railway][!highway], /* #16007 */
|
---|
27 | way[etcs ][!railway][route!=railway],
|
---|
28 | way[gauge ][!railway][route!=railway],
|
---|
29 | way[grade_of_track ][!railway][route!=railway],
|
---|
30 | way[kursbuchstrecke ][!railway][route!=railway],
|
---|
31 | way[lzb ][!railway][route!=railway],
|
---|
32 | way[old_railway_operator ][!railway][route!=railway],
|
---|
33 | way[operating_procedure ][!railway][route!=railway],
|
---|
34 | way[pzb ][!railway][route!=railway],
|
---|
35 | way[structure_gauge ][!railway][route!=railway],
|
---|
36 | way[tilting_technology ][!railway][route!=railway],
|
---|
37 | way[track_class ][!railway][route!=railway],
|
---|
38 | way[tracks ][!railway][route!=railway],
|
---|
39 | way[traffic_mode ][!railway][route!=railway],
|
---|
40 | way[workrules ][!railway][route!=railway],
|
---|
41 | way[length_unit ][!waterway],
|
---|
42 | way[canal ][!waterway],
|
---|
43 | way[have_riverbank ][!waterway],
|
---|
44 | *[border_type ][!boundary],
|
---|
45 | *[piste:difficulty ][!piste:type],
|
---|
46 | *[place ][!name][place!=islet][place!=plot][noname!=yes],
|
---|
47 | *[transformer ][!power],
|
---|
48 | *[source:date ][!source],
|
---|
49 | *[source:name ][!name][noname!=yes],
|
---|
50 | *[source:maxspeed:forward ][!maxspeed:forward][!maxspeed],
|
---|
51 | *[source:maxspeed:backward ][!maxspeed:backward][!maxspeed],
|
---|
52 | *[source:building ][!building],
|
---|
53 | *[source:ref ][!ref][noref!=yes],
|
---|
54 | *[source:population ][!population],
|
---|
55 | *[source:postal_code ][!postal_code],
|
---|
56 | *[source:ele ][!ele],
|
---|
57 | *[source:ref:INSEE ][!ref:INSEE],
|
---|
58 | *[source:lit ][!lit],
|
---|
59 | *[source:hgv ][!hgv],
|
---|
60 | *[source:highway ][!highway],
|
---|
61 | *[source:maxaxleload ][!maxaxleload],
|
---|
62 | *[source:surface ][!surface],
|
---|
63 | *[source:bridge ][!bridge],
|
---|
64 | *[source:old_name ][!old_name],
|
---|
65 | *[source:bicycle ][!bicycle],
|
---|
66 | *[source:designation ][!designation],
|
---|
67 | *[source:height ][!height],
|
---|
68 | *[source:lanes ][!lanes],
|
---|
69 | *[source:postcode ][!addr:postcode],
|
---|
70 | *[source:housenumber ][!addr:housenumber],
|
---|
71 | *[source:addr:postcode ][!addr:postcode],
|
---|
72 | *[source:addr:housenumber ][!addr:housenumber] {
|
---|
73 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
|
---|
74 | group: tr("missing tag");
|
---|
75 | assertMatch: "node source:addr:postcode=postman";
|
---|
76 | }
|
---|
77 |
|
---|
78 | /* {0.key} without {1.key} (info level) */
|
---|
79 | way[lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1],
|
---|
80 | way[lanes:backward][!lanes:forward][oneway!=yes][oneway!=-1],
|
---|
81 | *[leaf_type ][!leaf_cycle],
|
---|
82 | *[leaf_cycle][!leaf_type] {
|
---|
83 | throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
|
---|
84 | group: tr("missing tag");
|
---|
85 | }
|
---|
86 |
|
---|
87 | /* {0.key} without {1.tag}, #17997 */
|
---|
88 | node[railway:switch ][railway!=switch],
|
---|
89 | *[generator:source ][power!=generator],
|
---|
90 | *[generator:method ][power!=generator],
|
---|
91 | *[generator:type ][power!=generator],
|
---|
92 | node[fire_hydrant:type ][emergency!=fire_hydrant][disused:emergency!=fire_hydrant],
|
---|
93 | node[manhole ][man_made!=manhole],
|
---|
94 | way[fence_type ][barrier!=fence],
|
---|
95 | *[recycling_type ][amenity!=recycling],
|
---|
96 | *[information ][tourism!=information],
|
---|
97 | node[board_type ][information!=board],
|
---|
98 | *[shelter_type ][amenity!=shelter],
|
---|
99 | node[lamp_type ][highway!=street_lamp],
|
---|
100 | node[map_type ][information!=map],
|
---|
101 | *[site_type ][historic!=archaeological_site],
|
---|
102 | *[artwork_type ][tourism!=artwork][exhibit!=artwork],
|
---|
103 | *[castle_type ][historic!=castle],
|
---|
104 | *[parking ][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/][parking!=yes][parking!=no],
|
---|
105 | way[cutline ][man_made!=cutline],
|
---|
106 | *[zoo ][tourism!=zoo],
|
---|
107 | *[bunker_type ][military!=bunker] {
|
---|
108 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
|
---|
109 | group: tr("missing tag");
|
---|
110 | }
|
---|
111 |
|
---|
112 | /* {0.key} without {1.tag} or {2.tag} */
|
---|
113 | *[bridge:movable ][bridge!=movable][man_made!=bridge],
|
---|
114 | *[substation ][power!=substation][pipeline!=substation],
|
---|
115 | *[reservoir_type ][landuse!=reservoir][water!=reservoir],
|
---|
116 | way[waterway=pressurised ][tunnel!=flooded][man_made!=pipeline] {
|
---|
117 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.tag}", "{2.tag}");
|
---|
118 | group: tr("missing tag");
|
---|
119 | }
|
---|
120 |
|
---|
121 | /* {0.key} without {1.tag}, {2.tag} or {3.tag}, #15107, #20241 */
|
---|
122 | *[iata ][aeroway!=aerodrome][aeroway!=heliport][aeroway!=helipad],
|
---|
123 | *[icao ][aeroway!=aerodrome][aeroway!=heliport][aeroway!=helipad] {
|
---|
124 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.tag}", "{2.tag}", "{3.tag}");
|
---|
125 | group: tr("missing tag");
|
---|
126 | }
|
---|
127 |
|
---|
128 | /* {0.tag} without {1.key} (warning level), #18411, #18246 */
|
---|
129 | way[railway=construction][!construction],
|
---|
130 | way[highway=construction][!construction],
|
---|
131 | node[traffic_sign=maxspeed][!maxspeed][!/^maxspeed:.+/],
|
---|
132 | node[actuator=manual][!handle],
|
---|
133 | node[emergency=fire_hydrant][!fire_hydrant:type],
|
---|
134 | way[ boundary=administrative][!admin_level],
|
---|
135 | relation[boundary=administrative][!admin_level],
|
---|
136 | relation[route=bicycle ][!network][type=route],
|
---|
137 | relation[route=hiking ][!network][type=route],
|
---|
138 | relation[route=foot ][!network][type=route],
|
---|
139 | relation[route=horse ][!network][type=route],
|
---|
140 | relation[route=piste][!piste:type][type=route],
|
---|
141 | relation[route=ski ][!piste:type][type=route],
|
---|
142 | *[tourism=information][!information],
|
---|
143 | *[leisure=pitch][!sport],
|
---|
144 | *[aeroway=terminal][!building],
|
---|
145 | *[office=government][!government],
|
---|
146 | *[power=generator][!generator:source],
|
---|
147 | *[amenity=social_facility][!social_facility],
|
---|
148 | *[amenity=place_of_worship][!religion],
|
---|
149 | *[man_made=tower][!tower:type] {
|
---|
150 | throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
|
---|
151 | group: tr("missing tag");
|
---|
152 | assertNoMatch: "node traffic_sign=maxspeed maxspeed:hgv:conditional=\"80 @ (weight>7.5 AND 22:00-05:00)\"";
|
---|
153 | }
|
---|
154 |
|
---|
155 | /* {0.tag} without {1.key} (info level), #15107 */
|
---|
156 | *[aeroway=runway ][!ref],
|
---|
157 | *[aeroway=runway ][!surface],
|
---|
158 | node[highway=crossing ][!crossing],
|
---|
159 | way[highway=track ][!tracktype],
|
---|
160 | way[power=cable ][!location],
|
---|
161 | node[power=transformer ][!voltage:primary],
|
---|
162 | node[power=transformer ][!voltage:secondary],
|
---|
163 | node[transformer=distribution ][!voltage:primary][power=pole],
|
---|
164 | node[transformer=distribution ][!voltage:secondary][power=pole],
|
---|
165 | way[power=line ][!voltage],
|
---|
166 | way[power=minor_line ][!voltage],
|
---|
167 | way[power=cable ][!voltage],
|
---|
168 | *[power=generator ][!voltage][generator:output:electricity],
|
---|
169 | *[power=plant ][!voltage][plant:output:electricity],
|
---|
170 | *[power=substation ][!substation],
|
---|
171 | *[power=switch ][!switch],
|
---|
172 | *[power=transformer ][!transformer],
|
---|
173 | *[amenity=bank ][!operator],
|
---|
174 | *[amenity=cinema ][!operator],
|
---|
175 | *[amenity=fast_food ][!operator],
|
---|
176 | *[amenity=fuel ][!operator],
|
---|
177 | *[mountain_pass=yes ][!ele],
|
---|
178 | *[natural=peak ][!ele],
|
---|
179 | *[natural=water ][!water],
|
---|
180 | *[amenity=place_of_worship ][!denomination],
|
---|
181 | *[amenity=parking ][!parking],
|
---|
182 | *[amenity=parking_entrance ][!parking] {
|
---|
183 | throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
|
---|
184 | group: tr("missing tag");
|
---|
185 | assertMatch: "way power=line";
|
---|
186 | assertNoMatch: "way power=line voltage=1";
|
---|
187 | assertMatch: "way power=switch";
|
---|
188 | assertMatch: "way power=substation";
|
---|
189 | assertMatch: "way power=substation transformer=foobar";
|
---|
190 | assertNoMatch: "way power=substation substation=foobar";
|
---|
191 | assertMatch: "way power=generator generator:output:electricity=yes";
|
---|
192 | assertNoMatch: "way power=generator";
|
---|
193 | assertNoMatch: "way power=generator generator:output:electricity=yes voltage=1";
|
---|
194 | }
|
---|
195 |
|
---|
196 | /* {0.key} without {1.key} or {2.tag} */
|
---|
197 | way[bridge:structure ][!bridge][man_made!=bridge],
|
---|
198 | *[segregated ][!highway][railway!=crossing] {
|
---|
199 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
|
---|
200 | group: tr("missing tag");
|
---|
201 | }
|
---|
202 |
|
---|
203 | /* {0.tag} without {1.tag} (info level) see #11600 #11393 #11850 */
|
---|
204 | way[highway=motorway][!oneway][junction!=roundabout],
|
---|
205 | way[highway=motorway_link][!oneway][junction!=roundabout] {
|
---|
206 | throwOther: tr("{0} without {1}", "{0.tag}", "{1.tag}");
|
---|
207 | group: tr("missing tag");
|
---|
208 | }
|
---|
209 |
|
---|
210 | /* {0.tag} without {1.tag} */
|
---|
211 | way[usage=penstock][man_made!=pipeline],
|
---|
212 | way[usage=penstock][waterway!=pressurised] {
|
---|
213 | throwWarning: tr("{0} without {1}", "{0.tag}", "{1.tag}");
|
---|
214 | group: tr("missing tag");
|
---|
215 | }
|
---|
216 |
|
---|
217 | /* {0.tag} without {1.tag} or {2.tag} */
|
---|
218 | *[amenity=recycling][recycling_type!=container][recycling_type!=centre] {
|
---|
219 | throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.tag}");
|
---|
220 | group: tr("missing tag");
|
---|
221 | }
|
---|
222 |
|
---|
223 | /* {0.key} without {1.key}, {2.tag}, {3.tag} or {4.key} */
|
---|
224 | *[smoothness][!highway][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking)$/][barrier!=kerb][!kerb] {
|
---|
225 | throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.key}");
|
---|
226 | group: tr("missing tag");
|
---|
227 | }
|
---|
228 |
|
---|
229 | /* {0.key} without {1.key}, {2.tag}, {3.tag} or {4.tag} */
|
---|
230 | *[intermittent ][!waterway][natural!~/^(water|spring)$/][landuse!~/^(basin|reservoir)$/][ford!=yes],
|
---|
231 | *[boat ][!waterway][natural!=water ][landuse!~/^(basin|reservoir)$/][ford!=yes] {
|
---|
232 | throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.tag}");
|
---|
233 | group: tr("missing tag");
|
---|
234 | }
|
---|
235 |
|
---|
236 | /* {0.key} without {1.key}, {2.key} or {3.key} */
|
---|
237 | *[snowplowing][!highway][!amenity][!leisure] {
|
---|
238 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
|
---|
239 | group: tr("missing tag");
|
---|
240 | }
|
---|
241 |
|
---|
242 | /* {0.key} without {1.key}, {2.key} or {3.tag} */
|
---|
243 | *[toll ][!highway][!barrier][route!~/^(ferry|road)$/] {
|
---|
244 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.tag}");
|
---|
245 | group: tr("missing tag");
|
---|
246 | }
|
---|
247 |
|
---|
248 | /* {0.tag} together with {1.key}, see #17664, #17707, #16464, #10837, #14034, #9389, #11977, #13156, #16888 */
|
---|
249 | *[power=plant][/^generator:/],
|
---|
250 | *[power=generator][/^plant:/],
|
---|
251 | *[power=plant][voltage],
|
---|
252 | *[power=plant][frequency],
|
---|
253 | *[internet_access=no][internet_access:fee],
|
---|
254 | node[power=transformer][voltage],
|
---|
255 | node[transformer=distribution][voltage][power=pole],
|
---|
256 | *[amenity=vending_machine][shop],
|
---|
257 | *[noname?][name],
|
---|
258 | way[oneway=yes][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath][oneway:bicycle!=no][oneway:psv!=no],
|
---|
259 | way[oneway=yes][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][oneway:bicycle!=no][oneway:psv!=no],
|
---|
260 | way[oneway=-1 ][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath][oneway:bicycle!=no][oneway:psv!=no],
|
---|
261 | way[oneway=-1 ][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][oneway:bicycle!=no][oneway:psv!=no] {
|
---|
262 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
|
---|
263 | group: tr("suspicious tag combination");
|
---|
264 | assertMatch: "way power=plant generator:source=wind";
|
---|
265 | assertMatch: "way power=generator plant:source=combustion";
|
---|
266 | }
|
---|
267 |
|
---|
268 | /* {0.tag} together with {1.tag} (info level), see #9696 */
|
---|
269 | way[highway=footway][oneway=no] {
|
---|
270 | throwOther: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
271 | group: tr("suspicious tag combination");
|
---|
272 | }
|
---|
273 |
|
---|
274 | /* {0.tag} together with {1.tag}, see #18411, #17950, #17330, #17623, #17592, #17594, #17542, #16861, #16147, #10186, #18815 */
|
---|
275 | *[barrier=kerb][kerb=no],
|
---|
276 | way[highway=construction][construction=yes],
|
---|
277 | way[railway=construction][construction=yes],
|
---|
278 | *[man_made=bridge][bridge=yes],
|
---|
279 | *[man_made=tunnel][tunnel=yes],
|
---|
280 | *[amenity=police][police],
|
---|
281 | node[highway=crossing][crossing=no],
|
---|
282 | node[railway=crossing][crossing=no],
|
---|
283 | way[junction=yes][highway],
|
---|
284 | way[tracktype=grade1][surface].unpaved_surface,
|
---|
285 | way[tracktype=grade2][surface][surface=~/^(sand|mud)$/],
|
---|
286 | way[segregated][bicycle=no],
|
---|
287 | way[segregated][foot=no],
|
---|
288 | way[man_made=pipeline][tunnel=flooded] {
|
---|
289 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
290 | group: tr("suspicious tag combination");
|
---|
291 | }
|
---|
292 |
|
---|
293 | /* {0.tag} together with {1.tag} (error level) */
|
---|
294 | relation[type=multipolygon][area=no] {
|
---|
295 | throwError: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
296 | group: tr("suspicious tag combination");
|
---|
297 | }
|
---|
298 |
|
---|
299 | /* {0.key} together with {1.key}, #18267, #17630, #17604 */
|
---|
300 | node[marker][cover],
|
---|
301 | node[marker][voltage],
|
---|
302 | node[marker][pressure],
|
---|
303 | node[marker][diameter],
|
---|
304 | node[marker][substance],
|
---|
305 | *[building:part][building],
|
---|
306 | *[addr:street][addr:place][outside("CZ,DK")] {
|
---|
307 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
|
---|
308 | group: tr("suspicious tag combination");
|
---|
309 | }
|
---|
310 |
|
---|
311 | /* {0.tag} together with {1.tag} and {2.key}, #18471 */
|
---|
312 | way[highway=~/^(cycleway|footway|path)$/][segregated=no][sidewalk =~/^(left|right|both)$/] {
|
---|
313 | throwWarning: tr("{0} together with {1} and {2}", "{0.tag}", "{1.tag}", "{2.key}");
|
---|
314 | group: tr("suspicious tag combination");
|
---|
315 | }
|
---|
316 |
|
---|
317 | /* {0.key} together with {1.tag} and {2.key}, #19747 */
|
---|
318 | way[railway][electrified=no][frequency],
|
---|
319 | way[railway][electrified=no][voltage] {
|
---|
320 | throwWarning: tr("{0} together with {1} and {2}", "{0.key}", "{1.tag}", "{2.key}");
|
---|
321 | group: tr("suspicious tag combination");
|
---|
322 | }
|
---|
323 |
|
---|
324 | /* #11127, #13727 */
|
---|
325 | way[waterway][bridge=yes][waterway!=weir] {
|
---|
326 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.tag}");
|
---|
327 | suggestAlternative: "bridge=aqueduct";
|
---|
328 | group: tr("suspicious tag combination");
|
---|
329 | fixAdd: "bridge=aqueduct";
|
---|
330 | }
|
---|
331 | way[waterway=weir][bridge=yes][highway] {
|
---|
332 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
333 | suggestAlternative: "waterway=weir + ford=yes";
|
---|
334 | suggestAlternative: "waterway=dam";
|
---|
335 | suggestAlternative: tr("two objects, one with {0} and one with {1} + {2} + {3}", "{0.tag}", "{2.key}", "{1.tag}", "layer");
|
---|
336 | group: tr("suspicious tag combination");
|
---|
337 | }
|
---|
338 |
|
---|
339 | /* #16214 */
|
---|
340 | relation[type=multipolygon] >[role="inner"] way[area][eval(number_of_tags()) = 1] {
|
---|
341 | throwWarning: tr("{0} on an inner multipolygon ring without further tags", "{0.tag}");
|
---|
342 | fixRemove: "area";
|
---|
343 | set area_yes_autofix;
|
---|
344 | group: tr("suspicious tag combination");
|
---|
345 | }
|
---|
346 |
|
---|
347 | /* only {0.key}, #11104, #12422, #14950, #19572 */
|
---|
348 | *[lanes][eval(number_of_tags()) = 1],
|
---|
349 | *[surface][eval(number_of_tags()) = 1],
|
---|
350 | *[access][eval(number_of_tags()) = 1],
|
---|
351 | *[area][eval(number_of_tags()) = 1]!.area_yes_autofix,
|
---|
352 | *[name][eval(number_of_tags()) = 1],
|
---|
353 | *[ref][eval(number_of_tags()) = 1],
|
---|
354 | *[lit][eval(number_of_tags()) = 1] {
|
---|
355 | throwWarning: tr("incomplete object: only {0}", "{0.key}");
|
---|
356 | set only_one_tag;
|
---|
357 | group: tr("missing tag");
|
---|
358 | }
|
---|
359 | /* only {0.key} and {1.key} */
|
---|
360 | *[name][area][eval(number_of_tags()) = 2],
|
---|
361 | *[name][ref][eval(number_of_tags()) = 2] {
|
---|
362 | throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.key}");
|
---|
363 | group: tr("missing tag");
|
---|
364 | }
|
---|
365 | /* only {0.tag}, #15269 */
|
---|
366 | *[tourism=attraction][eval(number_of_tags()) = 1] {
|
---|
367 | throwWarning: tr("incomplete object: only {0}", "{0.tag}");
|
---|
368 | group: tr("missing tag");
|
---|
369 | }
|
---|
370 | /* only {0.key} and {1.tag} */
|
---|
371 | *[name][tourism=attraction][eval(number_of_tags()) = 2] {
|
---|
372 | throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.tag}");
|
---|
373 | group: tr("missing tag");
|
---|
374 | }
|
---|
375 |
|
---|
376 | /* #9811, #11491, #12865, #14310 */
|
---|
377 | *[place][place!=farm][place!=plot][/^(addr:housenumber|addr:housename|addr:flats|addr:conscriptionnumber|addr:street|addr:place|addr:city|addr:country|addr:full|addr:hamlet|addr:suburb|addr:subdistrict|addr:district|addr:province|addr:state|addr:interpolation|addr:interpolation|addr:inclusion)$/],
|
---|
378 | /* addr:postcode is used together with place in some countries */
|
---|
379 | *[boundary][/^addr:/],
|
---|
380 | *[highway][/^addr:/][highway!=services][highway!=rest_area][!"addr:postcode"] {
|
---|
381 | throwWarning: tr("{0} together with {1}", "{0.key}", "addr:*");
|
---|
382 | group: tr("suspicious tag combination");
|
---|
383 | assertMatch: "node place=foo addr:housenumber=5";
|
---|
384 | assertMatch: "node place=foo addr:housenumber=5 addr:postcode=12345";
|
---|
385 | assertNoMatch: "node place=foo addr:postcode=12345";
|
---|
386 | }
|
---|
387 | *[!highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
|
---|
388 | throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
|
---|
389 | group: tr("suspicious tag combination");
|
---|
390 | }
|
---|
391 | *[!highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
|
---|
392 | throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
|
---|
393 | group: tr("suspicious tag combination");
|
---|
394 | }
|
---|
395 | way[highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
|
---|
396 | throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
|
---|
397 | group: tr("suspicious tag combination");
|
---|
398 | fixRemove: "addr:postcode";
|
---|
399 | }
|
---|
400 | way[highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
|
---|
401 | throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
|
---|
402 | group: tr("suspicious tag combination");
|
---|
403 | }
|
---|
404 | way[highway][highway!=services][highway!=rest_area][!postal_code]["addr:postcode"] {
|
---|
405 | throwWarning: tr("{0} together with {1}", "{0.key}", "{4.key}");
|
---|
406 | suggestAlternative: "postal_code";
|
---|
407 | group: tr("suspicious tag combination");
|
---|
408 | fixChangeKey: "addr:postcode=>postal_code";
|
---|
409 | }
|
---|
410 |
|
---|
411 | /* #9195 */
|
---|
412 | way[highway=footway][cycleway=lane] {
|
---|
413 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
414 | suggestAlternative: "highway=path + foot=designated + bicycle=designated + segregated=yes";
|
---|
415 | group: tr("suspicious tag combination");
|
---|
416 | }
|
---|
417 |
|
---|
418 | /* {0} on suspicious object, #17255, #19650, #19572, #17253, #19821, #15667, #19930, #20435, #20471, #18815 */
|
---|
419 | way[oneway ][!highway][!area:highway][!railway][!aerialway][attraction!=summer_toboggan][aeroway!~/^(runway|taxiway)$/][leisure!=track][waterway !~ /^(canal|fairway|lock|river|tidal_channel)$/],
|
---|
420 | node[lanes ][!barrier][!ford][highway!=mini_roundabout][!junction][leisure!~/^(bowling_alley|slipway|swimming_pool|track)$/][!traffic_calming]!.only_one_tag,
|
---|
421 | way[lanes ][!barrier][!ford][!highway ][!area:highway][!junction][leisure!~/^(bowling_alley|slipway|swimming_pool|track)$/][!traffic_calming]!.only_one_tag,
|
---|
422 | *[tunnel ][!highway][!area:highway][!railway][!waterway][!piste:type][type!=tunnel][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=tunnel][power!=cable],
|
---|
423 | *[bridge ][!highway][!area:highway][!railway][!waterway][!piste:type][type!=bridge][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=bridge][building!=bridge],
|
---|
424 | *[psv ][!highway][!area:highway][!railway][!waterway][barrier!=bollard][amenity !~ /^parking.*/],
|
---|
425 | *[width ][!highway][!area:highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone][leisure!=track],
|
---|
426 | *[maxspeed ][!highway][!area:highway][!railway][traffic_sign !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:forward !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:backward !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type != enforcement][waterway !~ /^(canal|fairway|lock|river|tidal_channel)$/][!traffic_calming][aerialway!=zip_line],
|
---|
427 | way[incline][!highway][!area:highway][!railway][aeroway!~/^(runway|taxiway)$/][attraction!=summer_toboggan][leisure!=slipway] {
|
---|
428 | throwWarning: tr("{0} on suspicious object", "{0.key}");
|
---|
429 | group: tr("suspicious tag combination");
|
---|
430 | }
|
---|
431 |
|
---|
432 | /* #15667, #19930 */
|
---|
433 | way[waterway][oneway][waterway =~ /^(canal|fairway|lock|river|tidal_channel)$/] {
|
---|
434 | throwOther: tr("{0} together with {1}. The flow direction is defined by the way direction. Use {1} on {0} only in the rare case of a access restriction.", "{0.key}", "{1.key}");
|
---|
435 | group: tr("suspicious tag combination");
|
---|
436 | }
|
---|
437 |
|
---|
438 | *[amenity][amenity =~ /^(restaurant|cafe|fast_food|pub|place_of_worship|school|university|hospital|library|theatre|courthouse|bank|cinema|pharmacy|fuel)$/][!name][noname!=yes] {
|
---|
439 | throwOther: tr("{0} without {1}", "{0.tag}", "{2.key}");
|
---|
440 | group: tr("missing tag");
|
---|
441 | assertMatch: "node amenity=restaurant";
|
---|
442 | assertNoMatch: "node amenity=restaurant noname=yes";
|
---|
443 | assertNoMatch: "node amenity=restaurant name=Foobar";
|
---|
444 | }
|
---|
445 |
|
---|
446 | /* #10193, #16157 */
|
---|
447 | way[highway][barrier],
|
---|
448 | *[highway][waterway][waterway!=dam][waterway!=weir],
|
---|
449 | way[highway][natural][natural!=ridge],
|
---|
450 | *[landuse][building][landuse!=retail] {
|
---|
451 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
|
---|
452 | group: tr("suspicious tag combination");
|
---|
453 | assertNoMatch: "node highway=street_lamp natural=birds_nest";
|
---|
454 | }
|
---|
455 |
|
---|
456 | /* #6932 */
|
---|
457 | *[natural=water][leisure=swimming_pool] {
|
---|
458 | throwWarning: tr("natural water used for swimming pool");
|
---|
459 | group: tr("suspicious tag combination");
|
---|
460 | fixRemove: "natural";
|
---|
461 | }
|
---|
462 |
|
---|
463 | /* #9593, #11183, #12418, #12761, #17254, #19311 */
|
---|
464 | *[sport][sport!=skiing][!building][!club][tourism != hotel][highway !~ /^(pedestrian|raceway)$/][!leisure][natural !~ /^(beach|bare_rock|cliff|peak|water)$/][amenity !~ /^(bar|dojo|pub|restaurant|swimming_pool)$/][landuse !~ /^(recreation_ground|piste|farm|farmland)$/][barrier !~ /^(wall|retaining_wall)$/][!"piste:type"][shop!=sports][attraction!=summer_toboggan] {
|
---|
465 | throwWarning: tr("sport without physical feature");
|
---|
466 | group: tr("missing tag");
|
---|
467 | assertMatch: "node sport=tennis";
|
---|
468 | assertNoMatch: "node sport=tennis leisure=pitch";
|
---|
469 | assertNoMatch: "node sport=beachvolleyball natural=beach";
|
---|
470 | assertNoMatch: "node sport=skiing"; /* skiing has deprecated warning */
|
---|
471 | assertNoMatch: "node sport=swimming tourism=hotel";
|
---|
472 | assertNoMatch: "node sport=10pin amenity=restaurant";
|
---|
473 | }
|
---|
474 |
|
---|
475 | /* {0.key} without {1.key} or {2.key} see #10140 */
|
---|
476 | *[building:levels][!building][!building:part],
|
---|
477 | way[usage][!railway][!waterway][route!=railway][man_made!=pipeline] {
|
---|
478 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
479 | group: tr("missing tag");
|
---|
480 | }
|
---|
481 |
|
---|
482 | /* any other *_name tag (with some exceptions) but not a name , see #10837 #11297 #11539 #16437 #17026 */
|
---|
483 | *[/_name$/][!name][!old_name][!loc_name][!reg_name][!uic_name][!artist_name][!lock_name][!"osak:municipality_name"][!"osak:street_name"][noname!=yes] {
|
---|
484 | throwWarning: tr("alternative name without {0}", "{1.key}");
|
---|
485 | group: tr("missing tag");
|
---|
486 | }
|
---|
487 |
|
---|
488 | /* #19604 */
|
---|
489 | way[name][alt_name][name=*alt_name] {
|
---|
490 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
---|
491 | group: tr("suspicious tag combination");
|
---|
492 | fixRemove: "alt_name";
|
---|
493 | }
|
---|
494 |
|
---|
495 | /* #10837 */
|
---|
496 | way[destination][!oneway?][junction!=roundabout][highway] {
|
---|
497 | throwWarning: tr("incomplete usage of {0} on a way without {1}", "{0.key}", "{1.key}");
|
---|
498 | suggestAlternative: "destination:forward";
|
---|
499 | suggestAlternative: "destination:backward";
|
---|
500 | }
|
---|
501 |
|
---|
502 | /* #11389, #19010 */
|
---|
503 | way[maxspeed:forward][maxspeed:backward][!maxspeed]["maxspeed:forward"=*"maxspeed:backward"] {
|
---|
504 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
---|
505 | suggestAlternative: "maxspeed";
|
---|
506 | group: tr("suspicious tag combination");
|
---|
507 | fixChangeKey: "maxspeed:forward=>maxspeed";
|
---|
508 | fixRemove: "maxspeed:backward";
|
---|
509 | }
|
---|
510 | way[maxspeed:forward][maxspeed:backward][maxspeed]["maxspeed:forward"=*maxspeed]["maxspeed:backward"=*maxspeed] {
|
---|
511 | throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
512 | set AllSameMaxspeed;
|
---|
513 | suggestAlternative: "maxspeed";
|
---|
514 | group: tr("suspicious tag combination");
|
---|
515 | fixRemove: "maxspeed:forward";
|
---|
516 | fixRemove: "maxspeed:backward";
|
---|
517 | }
|
---|
518 | way[cycleway:left][cycleway:right][!cycleway]["cycleway:left"=*"cycleway:right"] {
|
---|
519 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
---|
520 | suggestAlternative: "cycleway";
|
---|
521 | group: tr("suspicious tag combination");
|
---|
522 | fixChangeKey: "cycleway:left=>cycleway";
|
---|
523 | fixRemove: "cycleway:right";
|
---|
524 | }
|
---|
525 | way[cycleway:left][cycleway:right][cycleway]["cycleway:left"=*cycleway]["cycleway:right"=*cycleway] {
|
---|
526 | throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
527 | set AllSameCycleway;
|
---|
528 | suggestAlternative: "cycleway";
|
---|
529 | group: tr("suspicious tag combination");
|
---|
530 | fixRemove: "cycleway:left";
|
---|
531 | fixRemove: "cycleway:right";
|
---|
532 | }
|
---|
533 | way[sidewalk:left][sidewalk:right][!sidewalk]["sidewalk:left"=*"sidewalk:right"] {
|
---|
534 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
---|
535 | suggestAlternative: "sidewalk";
|
---|
536 | group: tr("suspicious tag combination");
|
---|
537 | fixChangeKey: "sidewalk:left=>sidewalk";
|
---|
538 | fixRemove: "sidewalk:right";
|
---|
539 | }
|
---|
540 | way[sidewalk:left][sidewalk:right][sidewalk]["sidewalk:left"=*sidewalk]["sidewalk:right"=*sidewalk] {
|
---|
541 | throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
542 | set AllSameSidewalk;
|
---|
543 | suggestAlternative: "sidewalk";
|
---|
544 | group: tr("suspicious tag combination");
|
---|
545 | fixRemove: "sidewalk:left";
|
---|
546 | fixRemove: "sidewalk:right";
|
---|
547 | }
|
---|
548 | way["maxspeed:forward"]["maxspeed:backward"][maxspeed]!.AllSameMaxspeed,
|
---|
549 | way["cycleway:left"]["cycleway:right"][cycleway]!.AllSameCycleway,
|
---|
550 | way["sidewalk:left"]["sidewalk:right"][sidewalk]!.AllSameSidewalk {
|
---|
551 | throwWarning: tr("{0} and {1} together with {2} and conflicting values", "{0.key}", "{1.key}", "{2.key}");
|
---|
552 | group: tr("suspicious tag combination");
|
---|
553 | }
|
---|
554 | way["maxspeed:forward"][maxspeed][!"maxspeed:backward"],
|
---|
555 | way["maxspeed:backward"][maxspeed][!"maxspeed:forward"],
|
---|
556 | way["cycleway:left"][cycleway][!"cycleway:right"],
|
---|
557 | way["cycleway:right"][cycleway][!"cycleway:left"],
|
---|
558 | way["sidewalk:left"][sidewalk][!"sidewalk:right"],
|
---|
559 | way["sidewalk:right"][sidewalk][!"sidewalk:left"] {
|
---|
560 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
|
---|
561 | group: tr("suspicious tag combination");
|
---|
562 | }
|
---|
563 |
|
---|
564 | /* #11837 */
|
---|
565 | way[layer][layer<0][bridge][bridge!=no][location!=underground][indoor!=yes][!tunnel],
|
---|
566 | way[layer][layer>0][tunnel][tunnel!=no][location!=overground][indoor!=yes][!bridge] {
|
---|
567 | throwWarning: tr("{0} together with {1}", "{2.tag}", "{0.tag}");
|
---|
568 | group: tr("suspicious tag combination");
|
---|
569 | }
|
---|
570 |
|
---|
571 | /* #12942 */
|
---|
572 | relation[oneway][type!=route] {
|
---|
573 | throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}");
|
---|
574 | }
|
---|
575 |
|
---|
576 | /* #9182 */
|
---|
577 | way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) > 400] {
|
---|
578 | throwWarning: tr("Long waterway with {0} but without a tag which defines it as tunnel or underground. Remove {1} or add a tunnel tag if applicable. Also check crossing bridges and their {1} tags.", "{1.tag}", "{1.key}");
|
---|
579 | group: tr("suspicious tag combination");
|
---|
580 | }
|
---|
581 | way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) <= 400] {
|
---|
582 | throwOther: tr("Short waterway with {0} but without a tag which defines it as tunnel or underground. Remove {1} or add a tunnel tag if applicable. Also check crossing bridges and their {1} tags.", "{1.tag}", "{1.key}");
|
---|
583 | group: tr("suspicious tag combination");
|
---|
584 | }
|
---|
585 |
|
---|
586 | /* #13144, #15536 */
|
---|
587 | *[unisex=yes][female=yes][male!=yes][shop=hairdresser],
|
---|
588 | *[unisex=yes][male=yes][female!=yes][shop=hairdresser] {
|
---|
589 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
590 | group: tr("suspicious tag combination");
|
---|
591 | }
|
---|
592 | *[unisex=yes][female=yes][male=yes][shop=hairdresser] {
|
---|
593 | throwWarning: tr("{0} together with {1} and {2}. Remove {1} and {2}", "{0.tag}", "{1.tag}", "{2.tag}");
|
---|
594 | group: tr("suspicious tag combination");
|
---|
595 | fixRemove: "female";
|
---|
596 | fixRemove: "male";
|
---|
597 | }
|
---|
598 | *[female=yes][male=yes][!unisex][shop=hairdresser] {
|
---|
599 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
600 | suggestAlternative: "unisex=yes";
|
---|
601 | group: tr("suspicious tag combination");
|
---|
602 | fixRemove: "female";
|
---|
603 | fixRemove: "male";
|
---|
604 | fixAdd: "unisex=yes";
|
---|
605 | }
|
---|
606 |
|
---|
607 | /* {1.key} without {2.tag} see #13138, #14468 */
|
---|
608 | way!:closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir], /* water=intermittent is deprecated and has an own warning */
|
---|
609 | area:closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir] {
|
---|
610 | throwWarning: tr("{0} without {1}", "{1.key}", "{2.tag}");
|
---|
611 | group: tr("missing tag");
|
---|
612 | }
|
---|
613 |
|
---|
614 | /* #13680 */
|
---|
615 | area[golf=bunker][natural=beach] {
|
---|
616 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
617 | suggestAlternative: "natural=sand";
|
---|
618 | suggestAlternative: "surface=sand";
|
---|
619 | group: tr("suspicious tag combination");
|
---|
620 | }
|
---|
621 |
|
---|
622 | /* #13705 */
|
---|
623 | relation[type=multipolygon][building] > way {
|
---|
624 | set part_of_building_MP;
|
---|
625 | }
|
---|
626 | way["addr:housenumber"][!building][!"building:part"][!"demolished:building"][!note][!amenity][!leisure][!landuse][!man_made][!tourism][!barrier][place!=plot]!.part_of_building_MP {
|
---|
627 | /* don't exclude shop because a lot of real missing bulding tag cases have a shop tag. */
|
---|
628 | throwOther: tr("possibly missing {0} tag", "{1.key}");
|
---|
629 | group: tr("missing tag");
|
---|
630 | }
|
---|
631 |
|
---|
632 | /* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
|
---|
633 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/] {
|
---|
634 | set MotorwayTrunk;
|
---|
635 | }
|
---|
636 | way.MotorwayTrunk[lanes][turn:lanes ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
|
---|
637 | way.MotorwayTrunk[lanes][change:lanes ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
|
---|
638 | way.MotorwayTrunk[lanes][maxspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
|
---|
639 | way.MotorwayTrunk[lanes][minspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
|
---|
640 | way.MotorwayTrunk[lanes][destination:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
|
---|
641 | way.MotorwayTrunk[lanes][destination:ref:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
|
---|
642 | way.MotorwayTrunk[lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
|
---|
643 | throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}");
|
---|
644 | group: tr("suspicious tag combination");
|
---|
645 | }
|
---|
646 |
|
---|
647 | /* #14125, #14323, #18185 */
|
---|
648 | way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][oneway!=reversible][highway!=motorway][junction!=roundabout][lanes>2][mod(tag(lanes),2)=1] {
|
---|
649 | throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}");
|
---|
650 | group: tr("missing tag");
|
---|
651 | assertNoMatch: "way highway=primary lanes=2";
|
---|
652 | assertNoMatch: "way highway=primary lanes=3 lanes:backward=2";
|
---|
653 | assertNoMatch: "way highway=primary lanes=3 oneway=-1";
|
---|
654 | assertNoMatch: "way highway=primary lanes=4";
|
---|
655 | assertMatch: "way highway=primary lanes=3";
|
---|
656 | }
|
---|
657 |
|
---|
658 | /* #10932, #19609 */
|
---|
659 | way[highway][!lanes][/^.*:lanes$/][!source:lanes],
|
---|
660 | way[highway][!lanes][/^.*:lanes:(forward|backward|both_ways)$/],
|
---|
661 | way[highway][!lanes:both_ways][/^.*:lanes:both_ways$/] {
|
---|
662 | throwWarning: tr("{0} without {1}", "{2.key}", "{1.key}");
|
---|
663 | group: tr("missing tag");
|
---|
664 | assertMatch: "way highway=primary turn:lanes=left|right";
|
---|
665 | assertMatch: "way highway=primary turn:lanes:forward=left|right";
|
---|
666 | assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2";
|
---|
667 | }
|
---|
668 | way[highway][!lanes:forward][/^.*:lanes:forward$/][!lanes:backward][mod(tag(lanes),2)=0],
|
---|
669 | way[highway][!lanes:backward][/^.*:lanes:backward$/][!lanes:forward][mod(tag(lanes),2)=0] {
|
---|
670 | throwOther: tr("{0} without {1}", "{2.key}", "{1.key}");
|
---|
671 | group: tr("missing tag");
|
---|
672 | assertMatch: "way highway=primary turn:lanes:forward=left|right lanes=2";
|
---|
673 | assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes:forward=2";
|
---|
674 | assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes=3";
|
---|
675 | }
|
---|
676 |
|
---|
677 | /* #15774 */
|
---|
678 | node[emergency=fire_hydrant][fire_hydrant:count][fire_hydrant:count!=1] {
|
---|
679 | throwOther: tr("{0} together with {1}. Tag each hydrant separately.", "{0.tag}", "{1.tag}");
|
---|
680 | }
|
---|
681 |
|
---|
682 | /* #12502 */
|
---|
683 | node[leisure=park][natural=tree] {
|
---|
684 | throwWarning: tr("{0} together with {1} on a node. Remove {0}.", "{0.tag}", "{1.tag}");
|
---|
685 | group: tr("suspicious tag combination");
|
---|
686 | fixRemove: "leisure";
|
---|
687 | }
|
---|
688 |
|
---|
689 | /* #17305 */
|
---|
690 | area[boundary=administrative][landuse=residential] {
|
---|
691 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
692 | group: tr("suspicious tag combination");
|
---|
693 | }
|
---|
694 |
|
---|
695 | /* #17391 */
|
---|
696 | way[highway=pedestrian][width][width<3] {
|
---|
697 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
698 | suggestAlternative: "highway=footway";
|
---|
699 | group: tr("suspicious tag combination");
|
---|
700 | fixAdd: "highway=footway";
|
---|
701 | assertMatch: "way highway=pedestrian width=0.8";
|
---|
702 | assertMatch: "way highway=pedestrian width=1";
|
---|
703 | assertNoMatch: "way highway=pedestrian width=3";
|
---|
704 | assertNoMatch: "way highway=pedestrian width=5.5";
|
---|
705 | }
|
---|
706 |
|
---|
707 | /* see #17623 */
|
---|
708 | way:areaStyle[highway][highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service$|living_street|pedestrian|track|path|footway|cycleway|bus_guideway|bridleway/][area!=yes] {
|
---|
709 | throwOther: tr("A linear object {0} without {1} has a tag indicating that it is an area.", "{1.tag}", "{3.tag}");
|
---|
710 | group: tr("suspicious tag combination");
|
---|
711 | }
|
---|
712 |
|
---|
713 | /* #17804 */
|
---|
714 | area[cemetery=sector][landuse=cemetery] {
|
---|
715 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
716 | group: tr("suspicious tag combination");
|
---|
717 | }
|
---|
718 |
|
---|
719 | /* #17967 */
|
---|
720 | *[highway=cycleway][cycleway=track] {
|
---|
721 | throwWarning: tr("{0} together with {1}. Remove {1}.", "{0.tag}", "{1.tag}");
|
---|
722 | group: tr("suspicious tag combination");
|
---|
723 | fixRemove: "cycleway";
|
---|
724 | }
|
---|
725 |
|
---|
726 | /* #17973, #18183, #18331, #20318 */
|
---|
727 | way[highway=path ][!segregated][foot=designated][bicycle=designated],
|
---|
728 | way[highway=footway ][!segregated][bicycle=designated],
|
---|
729 | way[highway=cycleway][!segregated][foot=designated] {
|
---|
730 | throwWarning: tr("Combined foot- and cycleway without {0}.", "{1.key}");
|
---|
731 | group: tr("missing tag");
|
---|
732 | }
|
---|
733 |
|
---|
734 | /* #17989 */
|
---|
735 | node[emergency_ward_entrance][emergency!=emergency_ward_entrance] {
|
---|
736 | throwWarning: tr("{0} without {1}", "{0.tag}", "{1.tag}");
|
---|
737 | group: tr("missing tag");
|
---|
738 | fixAdd: "emergency=emergency_ward_entrance";
|
---|
739 | }
|
---|
740 |
|
---|
741 | /* #18203 */
|
---|
742 | way[construction][construction!=yes][construction!=minor][highway][highway!=construction] {
|
---|
743 | throwWarning: tr("{0} together with {1}", "{3.tag}", "{0.tag}");
|
---|
744 | group: tr("suspicious tag combination");
|
---|
745 | }
|
---|
746 |
|
---|
747 | /* #18374 */
|
---|
748 | *[amenity=recycling][collection_times="24/7"][!opening_hours],
|
---|
749 | *[amenity=recycling][collection_times ][!opening_hours][collection_times=~/[a-z]-[A-Z].*[0-9]-[0-9]/] {
|
---|
750 | throwWarning: tr("{0} together with {1}. Probably {2} is meant.", "{1.key}", "{0.tag}", "{2.key}");
|
---|
751 | group: tr("suspicious tag combination");
|
---|
752 | fixChangeKey: "collection_times => opening_hours";
|
---|
753 | assertMatch: "node amenity=recycling collection_times=\"Mo-Fr 06:00-20:00\"";
|
---|
754 | assertNoMatch: "node amenity=recycling collection_times=\"Mo-Fr 15:00\"";
|
---|
755 | assertNoMatch: "node amenity=recycling collection_times=\"Mo 08:00-11:00\"";
|
---|
756 | assertNoMatch: "node amenity=recycling collection_times=\"Sa[2,4] 8:00-11:00\"";
|
---|
757 | }
|
---|
758 | *[amenity=recycling][collection_times="24/7"][opening_hours],
|
---|
759 | *[amenity=recycling][collection_times ][opening_hours][collection_times=~/[a-z]-[A-Z].*[0-9]-[0-9]/] {
|
---|
760 | throwWarning: tr("{0} together with {1}. Probably {2} is meant.", "{1.key}", "{0.tag}", "{2.key}");
|
---|
761 | group: tr("suspicious tag combination");
|
---|
762 | }
|
---|
763 |
|
---|
764 | /* #19018 */
|
---|
765 | way[highway][crossing][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|service|living_street)$/] {
|
---|
766 | throwWarning: tr("{0} together with {1}. Should be used on a minor highway type or a node", "{1.key}", "{0.tag}");
|
---|
767 | group: tr("suspicious tag combination");
|
---|
768 | fixRemove: "crossing";
|
---|
769 | assertMatch: "way highway=trunk crossing=unmarked";
|
---|
770 | assertNoMatch: "way highway=construction construction=footway crossing=unmarked";
|
---|
771 | }
|
---|
772 |
|
---|
773 | /* #19066 */
|
---|
774 | *[amenity=recycling][!/^recycling:/][recycling_type!=centre] {
|
---|
775 | throwWarning: tr("{0} without {1}", "{0.tag}", "recycling:*");
|
---|
776 | group: tr("missing tag");
|
---|
777 | }
|
---|
778 | *[source:addr][!/^addr:/] {
|
---|
779 | throwWarning: tr("{0} without {1}", "{0.key}", "addr:*");
|
---|
780 | group: tr("missing tag");
|
---|
781 | assertMatch: "node source:addr=postman";
|
---|
782 | assertNoMatch: "node source:addr=postman addr:housenumber=42";
|
---|
783 | }
|
---|
784 | *[source:maxspeed][!/^maxspeed:?/] {
|
---|
785 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "maxspeed", "maxspeed:*");
|
---|
786 | group: tr("missing tag");
|
---|
787 | }
|
---|
788 |
|
---|
789 | /* #16898, tower vs. communications_tower, wiki suggests 100m as rough guideline, so we warn for < 75m */
|
---|
790 | *[man_made=communications_tower][height][height =~ /^((7[0-4]|[1-6]?[0-9])(\.[0-9]*)?( m)?|(2(4[0-5]|[0-3][0-9])|1?[0-9]?[0-9])((\.[0-9]*)?( ft|\')|\'(11|10|[0-9])(\.[0-9]*)?\"))$/] { /* 75m ~ 246ft ~ 246' */
|
---|
791 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
792 | suggestAlternative: "man_made=tower + tower:type=communication + height";
|
---|
793 | group: tr("suspicious tag combination");
|
---|
794 | assertMatch: "node man_made=communications_tower height=58";
|
---|
795 | assertMatch: "node man_made=communications_tower height=\"74 m\"";
|
---|
796 | assertMatch: "node man_made=communications_tower height=0.8";
|
---|
797 | assertMatch: "node man_made=communications_tower height=245'";
|
---|
798 | assertMatch: "node man_made=communications_tower height=\"224.22 ft\"";
|
---|
799 | assertMatch: "node man_made=communications_tower height=231'10.22\"";
|
---|
800 | assertNoMatch: "node man_made=communications_tower height=\"75 m\"";
|
---|
801 | assertNoMatch: "node man_made=communications_tower height=75.72";
|
---|
802 | assertNoMatch: "node man_made=communications_tower height=\"328.22 ft\"";
|
---|
803 | assertNoMatch: "node man_made=communications_tower height=4358'8\"";
|
---|
804 | assertNoMatch: "node height=4358'";
|
---|
805 | }
|
---|
806 |
|
---|
807 | /* #17296, If the value of fixme is only an osm key, it is often a leftover from a time when the object didn't have this key. The fixme was forgotten to remove when the key was added. Or the value of fixme should be described better what exactly needs to be fixed. */
|
---|
808 | *[fixme][count(split(" ", tag("fixme"))) == 1][has_tag_key(tag("fixme"))],
|
---|
809 | *[FIXME][count(split(" ", tag("FIXME"))) == 1][has_tag_key(tag("FIXME"))] {
|
---|
810 | throwWarning: tr("{0} together with {1}. Is the fixme fixed?", "{0.tag}", "{0.value}");
|
---|
811 | group: tr("suspicious tag combination");
|
---|
812 | assertMatch: "way name=\"Florist Gump\" fixme=name";
|
---|
813 | assertMatch: "way name=\"Florist Gump\" FIXME=name";
|
---|
814 | assertNoMatch: "way fixme=name";
|
---|
815 | assertNoMatch: "way name=\"Florist Gump\"";
|
---|
816 | assertNoMatch: "way name=\"Florist Gump\" fixme=\"the name might have changed\"";
|
---|
817 | }
|
---|
818 |
|
---|
819 | /* #19094 */
|
---|
820 | way[highway][placement=transition][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition],
|
---|
821 | way[highway][!placement][/^placement:.*$/][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition] {
|
---|
822 | throwWarning: tr("Use {0} only as value of {1}", "transition", "placement");
|
---|
823 | set PlacementTransitionWarning;
|
---|
824 | fixAdd: "placement=transition";
|
---|
825 | fixRemove: "placement:forward";
|
---|
826 | fixRemove: "placement:backward";
|
---|
827 | fixRemove: "placement:both_ways";
|
---|
828 | assertMatch: "way highway=primary placement=transition placement:both_ways=transition";
|
---|
829 | assertMatch: "way highway=primary placement:backward=transition placement:forward=transition";
|
---|
830 | assertNoMatch: "way highway=primary placement:backward=middle_of:1 placement:forward=transition";
|
---|
831 | assertNoMatch: "way highway=primary placement=middle_of:1 placement:backward=transition placement:forward=transition";
|
---|
832 | }
|
---|
833 | way[highway][placement][/^placement:.*$/]!.PlacementTransitionWarning,
|
---|
834 | way[highway]["placement:forward"]["placement:backward"]!.PlacementTransitionWarning,
|
---|
835 | way[highway]["placement:forward"]["placement:both_ways"]!.PlacementTransitionWarning,
|
---|
836 | way[highway]["placement:backward"]["placement:both_ways"]!.PlacementTransitionWarning {
|
---|
837 | throwError: tr("{0} together with {1}", "{1.key}", "{2.key}");
|
---|
838 | group: tr("suspicious tag combination");
|
---|
839 | assertMatch: "way highway=primary placement=left_of:2 placement:forward=right_of:1";
|
---|
840 | assertNoMatch: "way highway=primary placement:forward=right_of:1";
|
---|
841 | assertNoMatch: "way highway=primary placement:forward=transition placement:both_ways=transition";
|
---|
842 | }
|
---|
843 |
|
---|
844 | /* #19742 */
|
---|
845 | node:righthandtraffic[highway=mini_roundabout][direction=clockwise] {
|
---|
846 | throwWarning: tr("{0} together with {1} at right-hand traffic", "{1.tag}", "{2.tag}");
|
---|
847 | group: tr("suspicious tag combination");
|
---|
848 | }
|
---|
849 | node!:righthandtraffic[highway=mini_roundabout][direction=anticlockwise] {
|
---|
850 | throwWarning: tr("{0} together with {1} at left-hand traffic", "{1.tag}", "{2.tag}");
|
---|
851 | group: tr("suspicious tag combination");
|
---|
852 | }
|
---|
853 |
|
---|
854 | /* #19603 */
|
---|
855 | way[footway][highway][footway=sidewalk ][highway!~/^(path|footway|cycleway|construction|proposed)$/] {
|
---|
856 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
857 | group: tr("suspicious tag combination");
|
---|
858 | suggestAlternative: "sidewalk=left";
|
---|
859 | suggestAlternative: "sidewalk=right";
|
---|
860 | suggestAlternative: "sidewalk=both";
|
---|
861 | suggestAlternative: "sidewalk=separate";
|
---|
862 | }
|
---|
863 | way[footway][highway][footway!=sidewalk][highway!~/^(path|footway|cycleway|construction|proposed)$/] {
|
---|
864 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
865 | group: tr("suspicious tag combination");
|
---|
866 | }
|
---|
867 | way[footway][!highway][!/:highway$/],
|
---|
868 | way[cycleway][!highway][!/:highway$/] {
|
---|
869 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
|
---|
870 | group: tr("missing tag");
|
---|
871 | assertNoMatch: "way footway=sidewalk abandoned:highway=unclassified";
|
---|
872 | }
|
---|
873 |
|
---|
874 | /* #17498 */
|
---|
875 | way[bicycle][/^cycleway(:|$)/][!/^bicycle:/][bicycle=~/^(no|use_sidepath)$/][/^cycleway(:|$)/!~/^(no|none|separate)$/] {
|
---|
876 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
877 | group: tr("suspicious tag combination");
|
---|
878 | assertMatch: "way bicycle=no cycleway=track";
|
---|
879 | assertMatch: "way bicycle=use_sidepath cycleway=lane";
|
---|
880 | assertMatch: "way bicycle=use_sidepath cycleway:left=lane";
|
---|
881 | assertNoMatch: "way bicycle=use_sidepath cycleway=no";
|
---|
882 | assertNoMatch: "way bicycle=use_sidepath bicycle:backward=yes cycleway:left=lane"; /* instead of :backward, could also be :forward or :conditional */
|
---|
883 | assertNoMatch: "way bicycle=no cycleway:right=no";
|
---|
884 | assertNoMatch: "way bicycle=use_sidepath cycleway:left=none";
|
---|
885 | assertNoMatch: "way highway=cycleway cycleway=separate";
|
---|
886 | assertNoMatch: "way highway=residential bicycle=use_sidepath";
|
---|
887 | }
|
---|
888 |
|
---|
889 | /* #19980 */
|
---|
890 | way[highway=living_street][maxspeed][maxspeed=~/mph/][get(split(" ", tag(maxspeed)), 0) > 15],
|
---|
891 | way[highway=living_street][maxspeed][maxspeed!~/mph/][get(split(" ", tag(maxspeed)), 0) > 20] {
|
---|
892 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
893 | group: tr("suspicious tag combination");
|
---|
894 | assertNoMatch: "way highway=living_street";
|
---|
895 | assertNoMatch: "way highway=living_street maxspeed=20";
|
---|
896 | assertNoMatch: "way highway=living_street maxspeed=\"15 mph\"";
|
---|
897 | assertNoMatch: "way highway=living_street maxspeed=walk";
|
---|
898 | assertMatch: "way highway=living_street maxspeed=30";
|
---|
899 | assertMatch: "way highway=living_street maxspeed=\"20 mph\"";
|
---|
900 | }
|
---|