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

Last change on this file since 17410 was 17410, checked in by Klumbumbus, 3 years 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
RevLine 
[6548]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
[15268]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
[7229]9/* {0.key} without {1.key} (warning level) */
[16233]10way[junction ][!highway][junction!=yes][!area:highway],
[11305]11way[living_street ][!highway],
12way[maintenance ][!highway],
13way[median ][!highway],
14way[motorroad ][!highway],
15node[ntd_id ][!highway],
16way[sac_scale ][!highway],
17way[sidewalk ][!highway],
[13566]18way[step_count ][!highway][man_made!=tower],
[11305]19way[tracktype ][!highway],
[13092]20way[trail_visibility ][!highway], /* #15029 */
[11305]21way[trolley_wire ][!highway],
22way[zip_left ][!highway],
23way[zip_right ][!highway],
24way[detail ][!railway][route!=railway],
25way[eddy_current_brake ][!railway][route!=railway],
[13452]26way[electrified ][!railway][route!=railway][!highway], /* #16007 */
[11305]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],
[6548]44*[border_type ][!boundary],
[8121]45*[piste:difficulty ][!piste:type],
[14799]46*[place ][!name][place!=islet],
[15260]47*[transformer ][!power],
[6548]48*[source:date ][!source],
[16255]49*[source:name ][!name][noname!=yes],
[13032]50*[source:maxspeed:forward ][!maxspeed:forward][!maxspeed],
51*[source:maxspeed:backward ][!maxspeed:backward][!maxspeed],
[6548]52*[source:building ][!building],
[16255]53*[source:ref ][!ref][noref!=yes],
[6548]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],
[6645]69*[source:postcode ][!addr:postcode],
70*[source:housenumber ][!addr:housenumber],
71*[source:addr:postcode ][!addr:postcode],
[16255]72*[source:addr:housenumber ][!addr:housenumber] {
[6548]73 throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
[11146]74 group: tr("missing tag");
[6548]75 assertMatch: "node source:addr:postcode=postman";
76}
77
[7229]78/* {0.key} without {1.key} (info level) */
[11305]79way[lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1],
80way[lanes:backward][!lanes:forward][oneway!=yes][oneway!=-1],
[7229]81*[leaf_type ][!leaf_cycle],
82*[leaf_cycle][!leaf_type] {
83 throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
[11146]84 group: tr("missing tag");
[7229]85}
86
[15267]87/* {0.key} without {1.tag}, #17997 */
[15433]88node[railway:switch ][railway!=switch],
[15267]89*[generator:source ][power!=generator],
90*[generator:method ][power!=generator],
91*[generator:type ][power!=generator],
[14593]92node[fire_hydrant:type ][emergency!=fire_hydrant][disused:emergency!=fire_hydrant],
[15260]93node[manhole ][man_made!=manhole],
[11305]94way[fence_type ][barrier!=fence],
[6548]95*[recycling_type ][amenity!=recycling],
[7996]96*[information ][tourism!=information],
[11305]97node[board_type ][information!=board],
[6548]98*[shelter_type ][amenity!=shelter],
[11305]99node[lamp_type ][highway!=street_lamp],
100node[map_type ][information!=map],
[6548]101*[site_type ][historic!=archaeological_site],
[13508]102*[artwork_type ][tourism!=artwork][exhibit!=artwork],
[6548]103*[castle_type ][historic!=castle],
[15624]104*[parking ][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/][parking!=yes][parking!=no],
[11305]105way[cutline ][man_made!=cutline],
[6548]106*[bunker_type ][military!=bunker] {
107 throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
[11146]108 group: tr("missing tag");
[6548]109}
110
[17410]111/* {0.key} without {1.tag} or {2.tag} */
[12677]112*[bridge:movable ][bridge!=movable][man_made!=bridge],
[9903]113*[substation ][power!=substation][pipeline!=substation],
[13972]114*[reservoir_type ][landuse!=reservoir][water!=reservoir],
115way[waterway=pressurised ][tunnel!=flooded][man_made!=pipeline] {
[9903]116 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.tag}", "{2.tag}");
[11146]117 group: tr("missing tag");
[9903]118}
119
[17410]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
[15584]127/* {0.tag} without {1.key} (warning level), #18411, #18246 */
128way[railway=construction][!construction],
[15467]129way[highway=construction][!construction],
[17218]130node[traffic_sign=maxspeed][!maxspeed][!/^maxspeed:.+/],
[15139]131node[actuator=manual][!handle],
[14593]132node[emergency=fire_hydrant][!fire_hydrant:type],
[14800]133way[ boundary=administrative][!admin_level],
[13084]134relation[boundary=administrative][!admin_level],
[14798]135relation[route=bicycle ][!network][type=route],
136relation[route=hiking ][!network][type=route],
137relation[route=foot ][!network][type=route],
138relation[route=horse ][!network][type=route],
[10320]139relation[route=piste][!piste:type][type=route],
[14798]140relation[route=ski ][!piste:type][type=route],
[7996]141*[tourism=information][!information],
[11153]142*[leisure=pitch][!sport],
[7929]143*[aeroway=terminal][!building],
[15634]144*[office=government][!government],
[7967]145*[power=generator][!generator:source],
[11398]146*[amenity=social_facility][!social_facility],
[16705]147*[amenity=place_of_worship][!religion],
148*[man_made=tower][!tower:type] {
[7923]149 throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
[11146]150 group: tr("missing tag");
[17218]151 assertNoMatch: "node traffic_sign=maxspeed maxspeed:hgv:conditional=\"80 @ (weight>7.5 AND 22:00-05:00)\"";
[7923]152}
153
[15325]154/* {0.tag} without {1.key} (info level), #15107 */
155*[aeroway=runway ][!ref],
156*[aeroway=runway ][!surface],
[15635]157node[highway=crossing ][!crossing],
[11428]158way[highway=track ][!tracktype],
[9495]159way[power=cable ][!location],
[13814]160node[power=transformer ][!voltage:primary],
161node[power=transformer ][!voltage:secondary],
162node[transformer=distribution ][!voltage:primary][power=pole],
163node[transformer=distribution ][!voltage:secondary][power=pole],
[9500]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],
[12997]170*[power=switch ][!switch],
[9500]171*[power=transformer ][!transformer],
[14799]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],
[15568]178*[natural=water ][!water],
[14818]179*[amenity=place_of_worship ][!denomination],
[8080]180*[amenity=parking ][!parking],
181*[amenity=parking_entrance ][!parking] {
182 throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
[11146]183 group: tr("missing tag");
[9500]184 assertMatch: "way power=line";
185 assertNoMatch: "way power=line voltage=1";
[12997]186 assertMatch: "way power=switch";
[9500]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";
[8080]193}
194
[6548]195/* {0.key} without {1.key} or {2.tag} */
[13026]196way[bridge:structure ][!bridge][man_made!=bridge],
[9003]197*[segregated ][!highway][railway!=crossing] {
[6548]198 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
[11146]199 group: tr("missing tag");
[6548]200}
201
[8746]202/* {0.tag} without {1.tag} (info level) see #11600 #11393 #11850 */
[11305]203way[highway=motorway][!oneway][junction!=roundabout],
204way[highway=motorway_link][!oneway][junction!=roundabout] {
[8591]205 throwOther: tr("{0} without {1}", "{0.tag}", "{1.tag}");
[11146]206 group: tr("missing tag");
[8545]207}
208
[13972]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
[8411]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}");
[11146]219 group: tr("missing tag");
[8411]220}
221
[17324]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} */
[14127]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}");
[11146]232 group: tr("missing tag");
[7767]233}
234
[17209]235/* {0.key} without {1.key}, {2.key} or {3.key} */
[14735]236*[snowplowing][!highway][!amenity][!leisure] {
[6880]237 throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
[11146]238 group: tr("missing tag");
[6880]239}
240
[16859]241/* {0.key} without {1.key}, {2.key} or {3.tag} */
[7250]242*[toll ][!highway][!barrier][route!~/^(ferry|road)$/] {
243 throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.tag}");
[11146]244 group: tr("missing tag");
[7250]245}
246
[15110]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:/],
[15075]250*[power=plant][voltage],
251*[power=plant][frequency],
[14042]252*[internet_access=no][internet_access:fee],
[13814]253node[power=transformer][voltage],
254node[transformer=distribution][voltage][power=pole],
[11346]255*[amenity=vending_machine][shop],
[13401]256*[noname?][name],
[14364]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] {
[8077]261 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
[11146]262 group: tr("suspicious tag combination");
[15110]263 assertMatch: "way power=plant generator:source=wind";
264 assertMatch: "way power=generator plant:source=combustion";
[8077]265}
266
[8044]267/* {0.tag} together with {1.tag} (info level), see #9696 */
[11305]268way[highway=footway][oneway=no] {
[8044]269 throwOther: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]270 group: tr("suspicious tag combination");
[8044]271}
272
[15648]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],
[15595]277*[man_made=bridge][bridge=yes],
278*[man_made=tunnel][tunnel=yes],
[15307]279*[amenity=police][police],
[15286]280node[highway=crossing][crossing=no],
281node[railway=crossing][crossing=no],
[15094]282way[junction=yes][highway],
[15268]283way[tracktype=grade1][surface].unpaved_surface,
[14987]284way[tracktype=grade2][surface][surface=~/^(sand|mud)$/],
[14356]285way[segregated][bicycle=no],
286way[segregated][foot=no],
[14041]287way[man_made=pipeline][tunnel=flooded],
[14943]288way[waterway=canal][tunnel=yes] {
[8117]289 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]290 group: tr("suspicious tag combination");
[8117]291}
292
[14808]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
[15526]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],
[15004]305*[building:part][building],
[15256]306*[addr:street][addr:place][outside("CZ,DK")] {
[14998]307 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
[13401]308 group: tr("suspicious tag combination");
309}
310
[15722]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
[17025]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
[11074]324/* #11127, #13727 */
325way[waterway][bridge=yes][waterway!=weir] {
[8089]326 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.tag}");
327 suggestAlternative: "bridge=aqueduct";
[11146]328 group: tr("suspicious tag combination");
[8089]329 fixAdd: "bridge=aqueduct";
330}
[11074]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");
[11146]336 group: tr("suspicious tag combination");
[11074]337}
[8089]338
[13787]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
[17050]347/* only {0.key}, #11104, #12422, #14950, #19572 */
348*[lanes][eval(number_of_tags()) = 1],
349*[surface][eval(number_of_tags()) = 1],
[12416]350*[access][eval(number_of_tags()) = 1],
[13787]351*[area][eval(number_of_tags()) = 1]!.area_yes_autofix,
[8054]352*[name][eval(number_of_tags()) = 1],
[9837]353*[ref][eval(number_of_tags()) = 1],
354*[lit][eval(number_of_tags()) = 1] {
[8054]355 throwWarning: tr("incomplete object: only {0}", "{0.key}");
[17050]356 set only_one_tag;
[11146]357 group: tr("missing tag");
[8054]358}
[13086]359/* only {0.key} and {1.key} */
[8054]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}");
[11146]363 group: tr("missing tag");
[8054]364}
[13086]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}
[8054]375
[11548]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 */
[8043]379*[boundary][/^addr:/],
[8730]380*[highway][/^addr:/][highway!=services][highway!=rest_area][!"addr:postcode"] {
[16255]381 throwWarning: tr("{0} together with {1}", "{0.key}", "addr:*");
[11146]382 group: tr("suspicious tag combination");
[11548]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";
[8043]386}
[8730]387*[!highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
388 throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
[11146]389 group: tr("suspicious tag combination");
[8730]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}");
[11146]393 group: tr("suspicious tag combination");
[8730]394}
395way[highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
396 throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
[11146]397 group: tr("suspicious tag combination");
[8730]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}");
[11146]402 group: tr("suspicious tag combination");
[8730]403}
[10272]404way[highway][highway!=services][highway!=rest_area][!postal_code]["addr:postcode"] {
[11052]405 throwWarning: tr("{0} together with {1}", "{0.key}", "{4.key}");
[8730]406 suggestAlternative: "postal_code";
[11146]407 group: tr("suspicious tag combination");
[8730]408 fixChangeKey: "addr:postcode=>postal_code";
409}
[8043]410
[10350]411/* #9195 */
[11305]412way[highway=footway][cycleway=lane] {
[8042]413 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[8046]414 suggestAlternative: "highway=path + foot=designated + bicycle=designated + segregated=yes";
[11146]415 group: tr("suspicious tag combination");
[8042]416}
417
[17209]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)$/],
[17050]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,
[16859]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],
[17175]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],
[16859]427way[incline][!highway][!railway][aeroway!~/^(runway|taxiway)$/][attraction!=summer_toboggan][leisure!=slipway] {
[6548]428 throwWarning: tr("{0} on suspicious object", "{0.key}");
[11146]429 group: tr("suspicious tag combination");
[6548]430}
431
[17209]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
[14798]438*[amenity][amenity =~ /^(restaurant|cafe|fast_food|pub|place_of_worship|school|university|hospital|library|theatre|courthouse|bank|cinema|pharmacy|fuel)$/][!name][noname!=yes] {
[11146]439 throwOther: tr("{0} without {1}", "{0.tag}", "{2.key}");
440 group: tr("missing tag");
[6548]441 assertMatch: "node amenity=restaurant";
[7932]442 assertNoMatch: "node amenity=restaurant noname=yes";
[6548]443 assertNoMatch: "node amenity=restaurant name=Foobar";
444}
445
[13645]446/* #10193, #16157 */
[6550]447way[highway][barrier],
[8559]448*[highway][waterway][waterway!=dam][waterway!=weir],
[11429]449way[highway][natural][natural!=ridge],
[14275]450*[landuse][building][landuse!=retail] {
[11146]451 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
452 group: tr("suspicious tag combination");
[13645]453 assertNoMatch: "node highway=street_lamp natural=birds_nest";
[6548]454}
455
[10350]456/* #6932 */
[10798]457*[natural=water][leisure=swimming_pool] {
[6548]458 throwWarning: tr("natural water used for swimming pool");
[11146]459 group: tr("suspicious tag combination");
[7274]460 fixRemove: "natural";
[6548]461}
[6860]462
[16514]463/* #9593, #11183, #12418, #12761, #17254, #19311 */
[17091]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] {
[6860]465 throwWarning: tr("sport without physical feature");
[11146]466 group: tr("missing tag");
[6860]467 assertMatch: "node sport=tennis";
468 assertNoMatch: "node sport=tennis leisure=pitch";
469 assertNoMatch: "node sport=beachvolleyball natural=beach";
[11159]470 assertNoMatch: "node sport=skiing"; /* skiing has deprecated warning */
[6860]471 assertNoMatch: "node sport=swimming tourism=hotel";
472 assertNoMatch: "node sport=10pin amenity=restaurant";
[7243]473}
474
[13972]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] {
[7243]478 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.key}");
[11146]479 group: tr("missing tag");
[7243]480}
[7488]481
[16713]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] {
[7818]484 throwWarning: tr("alternative name without {0}", "{1.key}");
[11146]485 group: tr("missing tag");
[7818]486}
487
[16829]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
[10350]495/* #10837 */
[9386]496way[destination][!oneway?][junction!=roundabout][highway] {
[7818]497 throwWarning: tr("incomplete usage of {0} on a way without {1}", "{0.key}", "{1.key}");
498 suggestAlternative: "destination:forward";
499 suggestAlternative: "destination:backward";
[8700]500}
501
[16501]502/* #11389, #19010 */
[17024]503way[maxspeed:forward][maxspeed:backward][!maxspeed]["maxspeed:forward"=*"maxspeed:backward"] {
[8700]504 throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
505 suggestAlternative: "maxspeed";
[11146]506 group: tr("suspicious tag combination");
[8700]507 fixChangeKey: "maxspeed:forward=>maxspeed";
508 fixRemove: "maxspeed:backward";
509}
[17024]510way[maxspeed:forward][maxspeed:backward][maxspeed]["maxspeed:forward"=*maxspeed]["maxspeed:backward"=*maxspeed] {
[8700]511 throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
512 set AllSameMaxspeed;
513 suggestAlternative: "maxspeed";
[11146]514 group: tr("suspicious tag combination");
[8700]515 fixRemove: "maxspeed:forward";
516 fixRemove: "maxspeed:backward";
517}
[17024]518way[cycleway:left][cycleway:right][!cycleway]["cycleway:left"=*"cycleway:right"] {
[16501]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}
[17024]525way[cycleway:left][cycleway:right][cycleway]["cycleway:left"=*cycleway]["cycleway:right"=*cycleway] {
[16501]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}
[17024]533way[sidewalk:left][sidewalk:right][!sidewalk]["sidewalk:left"=*"sidewalk:right"] {
[16501]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}
[17024]540way[sidewalk:left][sidewalk:right][sidewalk]["sidewalk:left"=*sidewalk]["sidewalk:right"=*sidewalk] {
[16501]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 {
[8700]551 throwWarning: tr("{0} and {1} together with {2} and conflicting values", "{0.key}", "{1.key}", "{2.key}");
[11146]552 group: tr("suspicious tag combination");
[8700]553}
554way["maxspeed:forward"][maxspeed][!"maxspeed:backward"],
[16501]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"] {
[8700]560 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
[11146]561 group: tr("suspicious tag combination");
[8754]562}
563
[10350]564/* #11837 */
[8754]565way[layer][layer<0][bridge][bridge!=no][location!=underground][indoor!=yes][!tunnel],
566way[layer][layer>0][tunnel][tunnel!=no][location!=overground][indoor!=yes][!bridge] {
[11146]567 throwWarning: tr("{0} together with {1}", "{2.tag}", "{0.tag}");
568 group: tr("suspicious tag combination");
[10350]569}
570
571/* #12942 */
572relation[oneway][type!=route] {
573 throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}");
[10388]574}
575
576/* #9182 */
[10419]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}");
[11146]579 group: tr("suspicious tag combination");
[10388]580}
[10419]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}");
[11146]583 group: tr("suspicious tag combination");
[10537]584}
585
[13102]586/* #13144, #15536 */
587*[unisex=yes][female=yes][male!=yes][shop=hairdresser],
588*[unisex=yes][male=yes][female!=yes][shop=hairdresser] {
[10537]589 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]590 group: tr("suspicious tag combination");
[10537]591}
[13102]592*[unisex=yes][female=yes][male=yes][shop=hairdresser] {
[10537]593 throwWarning: tr("{0} together with {1} and {2}. Remove {1} and {2}", "{0.tag}", "{1.tag}", "{2.tag}");
[11146]594 group: tr("suspicious tag combination");
[10537]595 fixRemove: "female";
596 fixRemove: "male";
597}
[13102]598*[female=yes][male=yes][!unisex][shop=hairdresser] {
[10537]599 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
600 suggestAlternative: "unisex=yes";
[11146]601 group: tr("suspicious tag combination");
[10537]602 fixRemove: "female";
603 fixRemove: "male";
604 fixAdd: "unisex=yes";
[10538]605}
606
[14883]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] {
[10538]610 throwWarning: tr("{0} without {1}", "{1.key}", "{2.tag}");
[11146]611 group: tr("missing tag");
[10538]612}
[10995]613
[11047]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";
[11146]619 group: tr("suspicious tag combination");
[11080]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. */
[11146]628 throwOther: tr("possibly missing {0} tag", "{1.key}");
629 group: tr("missing tag");
[11371]630}
631
[16769]632/* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
[16860]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"))))] {
[16769]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
[15393]647/* #14125, #14323, #18185 */
[16860]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] {
[11406]649 throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}");
[11371]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";
[11406]654 assertNoMatch: "way highway=primary lanes=4";
[11371]655 assertMatch: "way highway=primary lanes=3";
[14593]656}
657
[16860]658/* #10932, #19609 */
659way[highway][!lanes][/^.*:lanes$/][!source:lanes],
660way[highway][!lanes][/^.*:lanes:(forward|backward|both_ways)$/],
[16769]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";
[16860]665 assertMatch: "way highway=primary turn:lanes:forward=left|right";
[16769]666 assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2";
[16860]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";
[16769]673 assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes:forward=2";
[16860]674 assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes=3";
[16769]675}
676
[14593]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}");
[14798]680}
[14830]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";
[14831]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 */
[14910]696way[highway=pedestrian][width][width<3] {
[14831]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";
[14910]703 assertNoMatch: "way highway=pedestrian width=3";
[14831]704 assertNoMatch: "way highway=pedestrian width=5.5";
[15094]705}
706
707/* see #17623 */
[15131]708way:areaStyle[highway][highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service$|living_street|pedestrian|track|path|footway|cycleway|bus_guideway|bridleway/][area!=yes] {
[15094]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");
[15169]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");
[15265]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";
[15268]724}
725
[15524]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,
[15402]729way[highway=cycleway][foot][foot!=no ][foot!=use_sidepath ][!segregated]!.unpaved_surface {
[15403]730 throwWarning: tr("Combined foot- and cycleway without {0}.", "{4.key}");
[15268]731 group: tr("missing tag");
[15311]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";
[15414]739}
740
741/* #18203 */
[15619]742way[construction][construction!=yes][construction!=minor][highway][highway!=construction] {
[15758]743 throwWarning: tr("{0} together with {1}", "{3.tag}", "{0.tag}");
[15414]744 group: tr("suspicious tag combination");
[15648]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";
[15765]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\"";
[15648]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");
[16254]762}
763
[16256]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
[16254]773/* #19066 */
774*[amenity=recycling][!/^recycling:/][recycling_type!=centre] {
775 throwWarning: tr("{0} without {1}", "{0.tag}", "recycling:*");
776 group: tr("missing tag");
[16255]777}
778*[source:addr][!/^addr:/] {
779 throwWarning: tr("{0} without {1}", "{0.key}", "addr:*");
780 group: tr("missing tag");
[16258]781 assertMatch: "node source:addr=postman";
782 assertNoMatch: "node source:addr=postman addr:housenumber=42";
[16255]783}
784*[source:maxspeed][!/^maxspeed:?/] {
785 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "maxspeed", "maxspeed:*");
786 group: tr("missing tag");
[16705]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'";
[16769]805}
[16775]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. */
[17038]808*[fixme][count(split(" ", tag("fixme"))) == 1][has_tag_key(tag("fixme"))],
809*[FIXME][count(split(" ", tag("FIXME"))) == 1][has_tag_key(tag("FIXME"))] {
[16775]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";
[16777]813 assertMatch: "way name=\"Florist Gump\" FIXME=name";
[16775]814 assertNoMatch: "way fixme=name";
815 assertNoMatch: "way name=\"Florist Gump\"";
816 assertNoMatch: "way name=\"Florist Gump\" fixme=\"the name might have changed\"";
[16778]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";
[16993]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");
[17051]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";
[17105]872}
873
874/* #17498 */
[17122]875way[bicycle][/^cycleway(:|$)/][!/^bicycle:/][bicycle=~/^(no|use_sidepath)$/][/^cycleway(:|$)/!~/^(no|none|separate)$/] {
[17105]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";
[17247]887}
888
889/* #19980 */
[17253]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] {
[17247]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";
[17253]896 assertNoMatch: "way highway=living_street maxspeed=\"15 mph\"";
[17247]897 assertNoMatch: "way highway=living_street maxspeed=walk";
898 assertMatch: "way highway=living_street maxspeed=30";
[17253]899 assertMatch: "way highway=living_street maxspeed=\"20 mph\"";
[16775]900}
Note: See TracBrowser for help on using the repository browser.