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

Last change on this file since 17759 was 17759, checked in by simon04, 6 months ago

fix #20751 - Add MapCSS function mod (modulo)

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