source: josm/trunk/resources/data/validator/combinations.mapcss@ 17253

Last change on this file since 17253 was 17253, checked in by Klumbumbus, 4 years ago

see #19980 - Warn about highway=livingstreet together with maxspeed>15 mph (instead of >20 mph)

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