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

Last change on this file since 17216 was 17209, checked in by Klumbumbus, 5 years ago

see #15667, fix #19930 - Downgrade warning about oneway on waterway to info level for navigable waterways

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