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

Last change on this file since 17410 was 17410, checked in by Klumbumbus, 2 months ago

fix #20241 - Don't warn about icao and iata tags on aerodrome=heliport

  • Property svn:eol-style set to native
File size: 43.6 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} */
112*[bridge:movable               ][bridge!=movable][man_made!=bridge],
113*[substation                   ][power!=substation][pipeline!=substation],
114*[reservoir_type               ][landuse!=reservoir][water!=reservoir],
115way[waterway=pressurised       ][tunnel!=flooded][man_made!=pipeline] {
116  throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.tag}", "{2.tag}");
117  group: tr("missing tag");
118}
119
120/* {0.key} without {1.tag}, {2.tag} or {3.tag}, #15107, #20241 */
121*[iata                         ][aeroway!=aerodrome][aeroway!=heliport][aeroway!=helipad],
122*[icao                         ][aeroway!=aerodrome][aeroway!=heliport][aeroway!=helipad] {
123  throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.tag}", "{2.tag}", "{3.tag}");
124  group: tr("missing tag");
125}
126
127/* {0.tag} without {1.key} (warning level), #18411, #18246 */
128way[railway=construction][!construction],
129way[highway=construction][!construction],
130node[traffic_sign=maxspeed][!maxspeed][!/^maxspeed:.+/],
131node[actuator=manual][!handle],
132node[emergency=fire_hydrant][!fire_hydrant:type],
133way[     boundary=administrative][!admin_level],
134relation[boundary=administrative][!admin_level],
135relation[route=bicycle ][!network][type=route],
136relation[route=hiking  ][!network][type=route],
137relation[route=foot    ][!network][type=route],
138relation[route=horse   ][!network][type=route],
139relation[route=piste][!piste:type][type=route],
140relation[route=ski  ][!piste:type][type=route],
141*[tourism=information][!information],
142*[leisure=pitch][!sport],
143*[aeroway=terminal][!building],
144*[office=government][!government],
145*[power=generator][!generator:source],
146*[amenity=social_facility][!social_facility],
147*[amenity=place_of_worship][!religion],
148*[man_made=tower][!tower:type] {
149  throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
150  group: tr("missing tag");
151  assertNoMatch: "node traffic_sign=maxspeed maxspeed:hgv:conditional=\"80 @ (weight>7.5 AND 22:00-05:00)\"";
152}
153
154/* {0.tag} without {1.key} (info level), #15107 */
155*[aeroway=runway               ][!ref],
156*[aeroway=runway               ][!surface],
157node[highway=crossing          ][!crossing],
158way[highway=track              ][!tracktype],
159way[power=cable                ][!location],
160node[power=transformer         ][!voltage:primary],
161node[power=transformer         ][!voltage:secondary],
162node[transformer=distribution  ][!voltage:primary][power=pole],
163node[transformer=distribution  ][!voltage:secondary][power=pole],
164way[power=line                 ][!voltage],
165way[power=minor_line           ][!voltage],
166way[power=cable                ][!voltage],
167*[power=generator              ][!voltage][generator:output:electricity],
168*[power=plant                  ][!voltage][plant:output:electricity],
169*[power=substation             ][!substation],
170*[power=switch                 ][!switch],
171*[power=transformer            ][!transformer],
172*[amenity=bank                 ][!operator],
173*[amenity=cinema               ][!operator],
174*[amenity=fast_food            ][!operator],
175*[amenity=fuel                 ][!operator],
176*[mountain_pass=yes            ][!ele],
177*[natural=peak                 ][!ele],
178*[natural=water                ][!water],
179*[amenity=place_of_worship     ][!denomination],
180*[amenity=parking              ][!parking],
181*[amenity=parking_entrance     ][!parking] {
182  throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
183  group: tr("missing tag");
184  assertMatch: "way power=line";
185  assertNoMatch: "way power=line voltage=1";
186  assertMatch: "way power=switch";
187  assertMatch: "way power=substation";
188  assertMatch: "way power=substation transformer=foobar";
189  assertNoMatch: "way power=substation substation=foobar";
190  assertMatch: "way power=generator generator:output:electricity=yes";
191  assertNoMatch: "way power=generator";
192  assertNoMatch: "way power=generator generator:output:electricity=yes voltage=1";
193}
194
195/* {0.key} without {1.key} or {2.tag} */
196way[bridge:structure           ][!bridge][man_made!=bridge],
197*[segregated                   ][!highway][railway!=crossing] {
198  throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
199  group: tr("missing tag");
200}
201
202/* {0.tag} without {1.tag} (info level) see #11600 #11393 #11850 */
203way[highway=motorway][!oneway][junction!=roundabout],
204way[highway=motorway_link][!oneway][junction!=roundabout] {
205  throwOther: tr("{0} without {1}", "{0.tag}", "{1.tag}");
206  group: tr("missing tag");
207}
208
209/* {0.tag} without {1.tag} */
210way[usage=penstock][man_made!=pipeline],
211way[usage=penstock][waterway!=pressurised] {
212  throwWarning: tr("{0} without {1}", "{0.tag}", "{1.tag}");
213  group: tr("missing tag");
214}
215
216/* {0.tag} without {1.tag} or {2.tag} */
217*[amenity=recycling][recycling_type!=container][recycling_type!=centre] {
218  throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.tag}");
219  group: tr("missing tag");
220}
221
222/* {0.key} without {1.key}, {2.tag}, {3.tag} or {4.key} */
223*[smoothness][!highway][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking)$/][barrier!=kerb][!kerb] {
224  throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.key}");
225  group: tr("missing tag");
226}
227
228/* {0.key} without {1.key}, {2.tag}, {3.tag} or {4.tag} */
229*[intermittent                 ][!waterway][natural!~/^(water|spring)$/][landuse!~/^(basin|reservoir)$/][ford!=yes],
230*[boat                         ][!waterway][natural!=water             ][landuse!~/^(basin|reservoir)$/][ford!=yes] {
231  throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.tag}");
232  group: tr("missing tag");
233}
234
235/* {0.key} without {1.key}, {2.key} or {3.key} */
236*[snowplowing][!highway][!amenity][!leisure] {
237  throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
238  group: tr("missing tag");
239}
240
241/* {0.key} without {1.key}, {2.key} or {3.tag} */
242*[toll                         ][!highway][!barrier][route!~/^(ferry|road)$/] {
243  throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.tag}");
244  group: tr("missing tag");
245}
246
247/* {0.tag} together with {1.key}, see #17664, #17707, #16464, #10837, #14034, #9389, #11977, #13156, #16888 */
248*[power=plant][/^generator:/],
249*[power=generator][/^plant:/],
250*[power=plant][voltage],
251*[power=plant][frequency],
252*[internet_access=no][internet_access:fee],
253node[power=transformer][voltage],
254node[transformer=distribution][voltage][power=pole],
255*[amenity=vending_machine][shop],
256*[noname?][name],
257way[oneway=yes][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath][oneway:bicycle!=no][oneway:psv!=no],
258way[oneway=yes][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][oneway:bicycle!=no][oneway:psv!=no],
259way[oneway=-1 ][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath][oneway:bicycle!=no][oneway:psv!=no],
260way[oneway=-1 ][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][oneway:bicycle!=no][oneway:psv!=no] {
261  throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
262  group: tr("suspicious tag combination");
263  assertMatch: "way power=plant generator:source=wind";
264  assertMatch: "way power=generator plant:source=combustion";
265}
266
267/* {0.tag} together with {1.tag} (info level), see #9696 */
268way[highway=footway][oneway=no] {
269  throwOther: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
270  group: tr("suspicious tag combination");
271}
272
273/* {0.tag} together with {1.tag}, see #18411, #17950, #17330, #17623, #17592, #17594, #17542, #16861, #16147, #10186 */
274*[barrier=kerb][kerb=no],
275way[highway=construction][construction=yes],
276way[railway=construction][construction=yes],
277*[man_made=bridge][bridge=yes],
278*[man_made=tunnel][tunnel=yes],
279*[amenity=police][police],
280node[highway=crossing][crossing=no],
281node[railway=crossing][crossing=no],
282way[junction=yes][highway],
283way[tracktype=grade1][surface].unpaved_surface,
284way[tracktype=grade2][surface][surface=~/^(sand|mud)$/],
285way[segregated][bicycle=no],
286way[segregated][foot=no],
287way[man_made=pipeline][tunnel=flooded],
288way[waterway=canal][tunnel=yes] {
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) */
294relation[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 */
300node[marker][cover],
301node[marker][voltage],
302node[marker][pressure],
303node[marker][diameter],
304node[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 */
312way[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 */
318way[railway][electrified=no][frequency],
319way[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 */
325way[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}
331way[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 */
340relation[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][/^(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}
395way[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}
400way[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}
404way[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 */
412way[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 */
419way[oneway ][!highway][!railway][!aerialway][attraction!=summer_toboggan][aeroway!~/^(runway|taxiway)$/][leisure!=track][waterway !~ /^(canal|fairway|lock|river|tidal_channel)$/],
420node[lanes ][!barrier][!ford][highway!=mini_roundabout][!junction][leisure!~/^(bowling_alley|slipway|swimming_pool|track)$/][!traffic_calming]!.only_one_tag,
421way[lanes  ][!barrier][!ford][!highway                ][!junction][leisure!~/^(bowling_alley|slipway|swimming_pool|track)$/][!traffic_calming]!.only_one_tag,
422*[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],
423*[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],
424*[psv      ][!highway][!railway][!waterway][barrier!=bollard][amenity !~ /^parking.*/],
425*[width    ][!highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone][leisure!=track],
426*[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],
427way[incline][!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 */
433way[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 */
447way[highway][barrier],
448*[highway][waterway][waterway!=dam][waterway!=weir],
449way[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],
477way[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 */
489way[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 */
496way[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 */
503way[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}
510way[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}
518way[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}
525way[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}
533way[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}
540way[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}
548way["maxspeed:forward"]["maxspeed:backward"][maxspeed]!.AllSameMaxspeed,
549way["cycleway:left"]["cycleway:right"][cycleway]!.AllSameCycleway,
550way["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}
554way["maxspeed:forward"][maxspeed][!"maxspeed:backward"],
555way["maxspeed:backward"][maxspeed][!"maxspeed:forward"],
556way["cycleway:left"][cycleway][!"cycleway:right"],
557way["cycleway:right"][cycleway][!"cycleway:left"],
558way["sidewalk:left"][sidewalk][!"sidewalk:right"],
559way["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 */
565way[layer][layer<0][bridge][bridge!=no][location!=underground][indoor!=yes][!tunnel],
566way[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 */
572relation[oneway][type!=route] {
573  throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}");
574}
575
576/* #9182 */
577way[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}
581way[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 */
608way!:closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir], /* water=intermittent is deprecated and has an own warning */
609area: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 */
615area[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 */
623relation[type=multipolygon][building] > way {
624  set part_of_building_MP;
625}
626way["addr:housenumber"][!building][!"building:part"][!"demolished:building"][!note][!amenity][!leisure][!landuse][!man_made][!tourism][!barrier]!.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 */
633way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/] {
634  set MotorwayTrunk;
635}
636way.MotorwayTrunk[lanes][turn:lanes              ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
637way.MotorwayTrunk[lanes][change:lanes            ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
638way.MotorwayTrunk[lanes][maxspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
639way.MotorwayTrunk[lanes][minspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
640way.MotorwayTrunk[lanes][destination:lanes       ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
641way.MotorwayTrunk[lanes][destination:ref:lanes   ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
642way.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 */
648way[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] {
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 */
659way[highway][!lanes][/^.*:lanes$/][!source:lanes],
660way[highway][!lanes][/^.*:lanes:(forward|backward|both_ways)$/],
661way[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}
668way[highway][!lanes:forward][/^.*:lanes:forward$/][!lanes:backward][!get(split(".", tag(lanes)/2), 1)=5],
669way[highway][!lanes:backward][/^.*:lanes:backward$/][!lanes:forward][!get(split(".", tag(lanes)/2), 1)=5] {
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 */
678node[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 */
683node[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 */
690area[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 */
696way[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 */
708way: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 */
714area[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 */
727way[highway=path    ][foot][foot!=no      ][foot!=use_sidepath   ][!segregated][bicycle][bicycle!=no][bicycle!=use_sidepath][bicycle!=dismount]!.unpaved_surface,
728way[highway=footway ][bicycle][bicycle!=no][bicycle!=use_sidepath][!segregated][bicycle!=dismount]!.unpaved_surface,
729way[highway=cycleway][foot][foot!=no      ][foot!=use_sidepath   ][!segregated]!.unpaved_surface {
730  throwWarning: tr("Combined foot- and cycleway without {0}.", "{4.key}");
731  group: tr("missing tag");
732}
733
734/* #17989 */
735node[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 */
742way[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 */
765way[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 */
820way[highway][placement=transition][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition],
821way[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}
833way[highway][placement][/^placement:.*$/]!.PlacementTransitionWarning,
834way[highway]["placement:forward"]["placement:backward"]!.PlacementTransitionWarning,
835way[highway]["placement:forward"]["placement:both_ways"]!.PlacementTransitionWarning,
836way[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 */
845node: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}
849node!: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 */
855way[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}
863way[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}
867way[footway][!highway][!/:highway$/],
868way[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 */
875way[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 */
890way[highway=living_street][maxspeed][maxspeed=~/mph/][get(split(" ", tag(maxspeed)), 0) > 15],
891way[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}
Note: See TracBrowser for help on using the repository browser.