source: josm/trunk/data/validator/combinations.mapcss@ 14272

Last change on this file since 14272 was 14127, checked in by Klumbumbus, 7 years ago

fix #16300 - don't warn about some intermittent, boat, ford, basin, reservoir combinations (based on patch by kre3d)

  • Property svn:eol-style set to native
File size: 25.0 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
[7229]5/* {0.key} without {1.key} (warning level) */
[7906]6way[junction ][!highway][junction!=yes],
[11407]7way[lanes ][!highway][leisure!=track][leisure!=swimming_pool],
[11305]8way[living_street ][!highway],
9way[maintenance ][!highway],
10way[median ][!highway],
11way[motorroad ][!highway],
12node[ntd_id ][!highway],
13way[sac_scale ][!highway],
14way[sidewalk ][!highway],
[13566]15way[step_count ][!highway][man_made!=tower],
[11305]16way[tracktype ][!highway],
[13092]17way[trail_visibility ][!highway], /* #15029 */
[11305]18way[trolley_wire ][!highway],
19way[zip_left ][!highway],
20way[zip_right ][!highway],
21way[detail ][!railway][route!=railway],
22way[eddy_current_brake ][!railway][route!=railway],
[13452]23way[electrified ][!railway][route!=railway][!highway], /* #16007 */
[11305]24way[etcs ][!railway][route!=railway],
25way[gauge ][!railway][route!=railway],
26way[grade_of_track ][!railway][route!=railway],
27way[kursbuchstrecke ][!railway][route!=railway],
28way[lzb ][!railway][route!=railway],
29way[old_railway_operator ][!railway][route!=railway],
30way[operating_procedure ][!railway][route!=railway],
31way[pzb ][!railway][route!=railway],
32way[structure_gauge ][!railway][route!=railway],
33way[tilting_technology ][!railway][route!=railway],
34way[track_class ][!railway][route!=railway],
35way[tracks ][!railway][route!=railway],
36way[traffic_mode ][!railway][route!=railway],
37way[workrules ][!railway][route!=railway],
38way[stream ][!waterway],
39way[length_unit ][!waterway],
40way[canal ][!waterway],
41way[have_riverbank ][!waterway],
[6548]42*[border_type ][!boundary],
[8121]43*[piste:difficulty ][!piste:type],
[6548]44*[source:date ][!source],
45*[source:name ][!name],
[13032]46*[source:maxspeed:forward ][!maxspeed:forward][!maxspeed],
47*[source:maxspeed:backward ][!maxspeed:backward][!maxspeed],
[6548]48*[source:building ][!building],
49*[source:ref ][!ref],
50*[source:population ][!population],
51*[source:postal_code ][!postal_code],
52*[source:ele ][!ele],
53*[source:ref:INSEE ][!ref:INSEE],
54*[source:lit ][!lit],
55*[source:hgv ][!hgv],
56*[source:highway ][!highway],
57*[source:maxaxleload ][!maxaxleload],
58*[source:surface ][!surface],
59*[source:bridge ][!bridge],
60*[source:old_name ][!old_name],
61*[source:bicycle ][!bicycle],
62*[source:designation ][!designation],
63*[source:height ][!height],
64*[source:lanes ][!lanes],
[6645]65*[source:postcode ][!addr:postcode],
66*[source:housenumber ][!addr:housenumber],
67*[source:addr:postcode ][!addr:postcode],
68*[source:addr:housenumber ][!addr:housenumber],
[6548]69*[source:addr ][!/^addr:/],
70*[source:maxspeed ][!/^maxspeed:?/] {
71 throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
[11146]72 group: tr("missing tag");
[6548]73 assertMatch: "way lanes=42";
74 assertNoMatch: "way lanes=42 highway=unclassified";
75 assertMatch: "node source:addr:postcode=postman";
76 assertMatch: "node source:addr=postman";
77 assertNoMatch: "node source:addr=postman addr:housenumber=42";
78}
79
[7229]80/* {0.key} without {1.key} (info level) */
[11305]81way[lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1],
82way[lanes:backward][!lanes:forward][oneway!=yes][oneway!=-1],
[7229]83*[leaf_type ][!leaf_cycle],
84*[leaf_cycle][!leaf_type] {
85 throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
[11146]86 group: tr("missing tag");
[7229]87}
88
[6548]89/* {0.key} without {1.tag} */
[9500]90*[transformer ][!power],
[11305]91way[fence_type ][barrier!=fence],
[6548]92*[recycling_type ][amenity!=recycling],
[7996]93*[information ][tourism!=information],
[11305]94node[board_type ][information!=board],
[6548]95*[shelter_type ][amenity!=shelter],
[11305]96node[lamp_type ][highway!=street_lamp],
97node[map_type ][information!=map],
[6548]98*[site_type ][historic!=archaeological_site],
[13508]99*[artwork_type ][tourism!=artwork][exhibit!=artwork],
[6548]100*[castle_type ][historic!=castle],
[8147]101*[parking ][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/],
[11305]102way[cutline ][man_made!=cutline],
[6548]103*[bunker_type ][military!=bunker] {
104 throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
[11146]105 group: tr("missing tag");
[6548]106}
107
[9903]108/* {0.key} without {1.tag} or {2.tag} */
[12677]109*[bridge:movable ][bridge!=movable][man_made!=bridge],
[9903]110*[substation ][power!=substation][pipeline!=substation],
[13972]111*[reservoir_type ][landuse!=reservoir][water!=reservoir],
112way[waterway=pressurised ][tunnel!=flooded][man_made!=pipeline] {
[9903]113 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.tag}", "{2.tag}");
[11146]114 group: tr("missing tag");
[9903]115}
116
[8080]117/* {0.tag} without {1.key} (warning level) */
[13084]118way[boundary=administrative][!admin_level],
119relation[boundary=administrative][!admin_level],
[10320]120relation[route=bicycle][!network][type=route],
121relation[route=hiking][!network][type=route],
122relation[route=foot][!network][type=route],
123relation[route=horse][!network][type=route],
124relation[route=piste][!piste:type][type=route],
125relation[route=ski][!piste:type][type=route],
[7996]126*[tourism=information][!information],
[11153]127*[leisure=pitch][!sport],
[7929]128*[aeroway=terminal][!building],
[7967]129*[power=generator][!generator:source],
[11398]130*[amenity=social_facility][!social_facility],
[7929]131*[amenity=place_of_worship][!religion] {
[7923]132 throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
[11146]133 group: tr("missing tag");
[7923]134}
135
[8080]136/* {0.tag} without {1.key} (info level) */
[11428]137way[highway=track ][!tracktype],
[9495]138way[power=cable ][!location],
[13814]139node[power=transformer ][!voltage:primary],
140node[power=transformer ][!voltage:secondary],
141node[transformer=distribution ][!voltage:primary][power=pole],
142node[transformer=distribution ][!voltage:secondary][power=pole],
[9500]143way[power=line ][!voltage],
144way[power=minor_line ][!voltage],
145way[power=cable ][!voltage],
146*[power=generator ][!voltage][generator:output:electricity],
147*[power=plant ][!voltage][plant:output:electricity],
148*[power=substation ][!substation],
[12997]149*[power=switch ][!switch],
[9500]150*[power=transformer ][!transformer],
[8080]151*[amenity=parking ][!parking],
152*[amenity=parking_entrance ][!parking] {
153 throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
[11146]154 group: tr("missing tag");
[9500]155 assertMatch: "way power=line";
156 assertNoMatch: "way power=line voltage=1";
[12997]157 assertMatch: "way power=switch";
[9500]158 assertMatch: "way power=substation";
159 assertMatch: "way power=substation transformer=foobar";
160 assertNoMatch: "way power=substation substation=foobar";
161 assertMatch: "way power=generator generator:output:electricity=yes";
162 assertNoMatch: "way power=generator";
163 assertNoMatch: "way power=generator generator:output:electricity=yes voltage=1";
[8080]164}
165
[6548]166/* {0.key} without {1.key} or {2.tag} */
[13026]167way[bridge:structure ][!bridge][man_made!=bridge],
[10068]168*[smoothness ][!highway][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking)$/],
[9003]169*[segregated ][!highway][railway!=crossing] {
[6548]170 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
[11146]171 group: tr("missing tag");
[6548]172}
173
[8746]174/* {0.tag} without {1.tag} (info level) see #11600 #11393 #11850 */
[11305]175way[highway=motorway][!oneway][junction!=roundabout],
176way[highway=motorway_link][!oneway][junction!=roundabout] {
[8591]177 throwOther: tr("{0} without {1}", "{0.tag}", "{1.tag}");
[11146]178 group: tr("missing tag");
[8545]179}
180
[13972]181/* {0.tag} without {1.tag} */
182way[usage=penstock][man_made!=pipeline],
183way[usage=penstock][waterway!=pressurised] {
184 throwWarning: tr("{0} without {1}", "{0.tag}", "{1.tag}");
185 group: tr("missing tag");
186}
187
[8411]188/* {0.tag} without {1.tag} or {2.tag} */
189*[amenity=recycling][recycling_type!=container][recycling_type!=centre] {
190 throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.tag}");
[11146]191 group: tr("missing tag");
[8411]192}
193
[8057]194/* {0.key} without {1.key}, {2.tag} or {3.tag} */
[14127]195*[intermittent ][!waterway][natural!~/^(water|spring)$/][landuse!~/^(basin|reservoir)$/][ford!=yes],
196*[boat ][!waterway][natural!=water ][landuse!~/^(basin|reservoir)$/][ford!=yes] {
197 throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.tag}");
[11146]198 group: tr("missing tag");
[7767]199}
200
[6880]201/* {0.key} without {1.key}, {2.key} or {3.key} */
[11513]202way[oneway][!highway][!railway][!aerialway],
[6880]203*[snowplowing ][!highway][!amenity][!leisure] {
204 throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
[11146]205 group: tr("missing tag");
[6880]206}
207
[7250]208/* {0.key} without {1.key}, {2.key} or {3.tag} */
[11305]209way[incline ][!highway][!railway][aeroway!~/^(runway|taxiway)$/],
[7250]210*[toll ][!highway][!barrier][route!~/^(ferry|road)$/] {
211 throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.tag}");
[11146]212 group: tr("missing tag");
[7250]213}
214
[14042]215/* {0.tag} together with {1.key}, see #16464, #10837, #14034, #9389, #11977, #13156 */
216*[internet_access=no][internet_access:fee],
[13814]217node[power=transformer][voltage],
218node[transformer=distribution][voltage][power=pole],
[11346]219*[amenity=vending_machine][shop],
[13401]220*[noname?][name],
[10535]221way[oneway=yes][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath],
222way[oneway=yes][/:forward/][!traffic_sign:forward][bicycle:forward!=use_sidepath],
223way[oneway=-1 ][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath],
224way[oneway=-1 ][/:forward/][!traffic_sign:forward][bicycle:forward!=use_sidepath] {
[8077]225 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
[11146]226 group: tr("suspicious tag combination");
[8077]227}
228
[8044]229/* {0.tag} together with {1.tag} (info level), see #9696 */
[11305]230way[highway=footway][oneway=no] {
[8044]231 throwOther: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]232 group: tr("suspicious tag combination");
[8044]233}
234
[14041]235/* {0.tag} together with {1.tag}, see #16147, #10186 */
236way[man_made=pipeline][tunnel=flooded],
237way[waterway=canal][tunnel=yes],
[11305]238way[highway=footway][bicycle=designated] {
[8117]239 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]240 group: tr("suspicious tag combination");
[8117]241}
242
[13401]243/* {0.key} together with {1.key} (info level) */
244*[addr:street][addr:place] {
245 throwOther: tr("{0} together with {1}", "{0.key}", "{1.key}");
246 group: tr("suspicious tag combination");
247}
248
[11074]249/* #11127, #13727 */
250way[waterway][bridge=yes][waterway!=weir] {
[8089]251 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.tag}");
252 suggestAlternative: "bridge=aqueduct";
[11146]253 group: tr("suspicious tag combination");
[8089]254 fixAdd: "bridge=aqueduct";
255}
[11074]256way[waterway=weir][bridge=yes][highway] {
257 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
258 suggestAlternative: "waterway=weir + ford=yes";
259 suggestAlternative: "waterway=dam";
260 suggestAlternative: tr("two objects, one with {0} and one with {1} + {2} + {3}", "{0.tag}", "{2.key}", "{1.tag}", "layer");
[11146]261 group: tr("suspicious tag combination");
[11074]262}
[8089]263
[13787]264/* #16214 */
265relation[type=multipolygon] >[role="inner"] way[area][eval(number_of_tags()) = 1] {
266 throwWarning: tr("{0} on an inner multipolygon ring without further tags", "{0.tag}");
267 fixRemove: "area";
268 set area_yes_autofix;
269 group: tr("suspicious tag combination");
270}
271
[12416]272/* only {0.key}, see #11104 #12422 #14950 */
273*[access][eval(number_of_tags()) = 1],
[13787]274*[area][eval(number_of_tags()) = 1]!.area_yes_autofix,
[8054]275*[name][eval(number_of_tags()) = 1],
[9837]276*[ref][eval(number_of_tags()) = 1],
277*[lit][eval(number_of_tags()) = 1] {
[8054]278 throwWarning: tr("incomplete object: only {0}", "{0.key}");
[11146]279 group: tr("missing tag");
[8054]280}
[13086]281/* only {0.key} and {1.key} */
[8054]282*[name][area][eval(number_of_tags()) = 2],
283*[name][ref][eval(number_of_tags()) = 2] {
284 throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.key}");
[11146]285 group: tr("missing tag");
[8054]286}
[13086]287/* only {0.tag}, #15269 */
288*[tourism=attraction][eval(number_of_tags()) = 1] {
289 throwWarning: tr("incomplete object: only {0}", "{0.tag}");
290 group: tr("missing tag");
291}
292/* only {0.key} and {1.tag} */
293*[name][tourism=attraction][eval(number_of_tags()) = 2] {
294 throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.tag}");
295 group: tr("missing tag");
296}
[8054]297
[11548]298/* #9811, #11491, #12865, #14310 */
299*[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)$/],
300/* addr:postcode is used together with place in some countries */
[8043]301*[boundary][/^addr:/],
[8730]302*[highway][/^addr:/][highway!=services][highway!=rest_area][!"addr:postcode"] {
[8043]303 throwWarning: tr("{0} together with addr:*", "{0.key}");
[11146]304 group: tr("suspicious tag combination");
[11548]305 assertMatch: "node place=foo addr:housenumber=5";
306 assertMatch: "node place=foo addr:housenumber=5 addr:postcode=12345";
307 assertNoMatch: "node place=foo addr:postcode=12345";
[8043]308}
[8730]309*[!highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
310 throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
[11146]311 group: tr("suspicious tag combination");
[8730]312}
313*[!highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
314 throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
[11146]315 group: tr("suspicious tag combination");
[8730]316}
317way[highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
318 throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
[11146]319 group: tr("suspicious tag combination");
[8730]320 fixRemove: "addr:postcode";
321}
322way[highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
323 throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
[11146]324 group: tr("suspicious tag combination");
[8730]325}
[10272]326way[highway][highway!=services][highway!=rest_area][!postal_code]["addr:postcode"] {
[11052]327 throwWarning: tr("{0} together with {1}", "{0.key}", "{4.key}");
[8730]328 suggestAlternative: "postal_code";
[11146]329 group: tr("suspicious tag combination");
[8730]330 fixChangeKey: "addr:postcode=>postal_code";
331}
[8043]332
[10350]333/* #9195 */
[11305]334way[highway=footway][cycleway=lane] {
[8042]335 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[8046]336 suggestAlternative: "highway=path + foot=designated + bicycle=designated + segregated=yes";
[11146]337 group: tr("suspicious tag combination");
[8042]338}
339
[6548]340/* {0} on suspicious object */
[12704]341*[tunnel ][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor],
342*[bridge ][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=bridge][building!=bridge],
[6548]343*[psv ][!highway][!railway][!waterway][amenity !~ /^parking.*/],
[11430]344*[width ][!highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone],
[12473]345*[maxspeed][!highway][!railway][traffic_sign !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type != enforcement][waterway !~ /^(river|canal|lock)$/][!traffic_calming][aerialway!=zip_line] {
[6548]346 throwWarning: tr("{0} on suspicious object", "{0.key}");
[11146]347 group: tr("suspicious tag combination");
[6548]348}
349
[11146]350node[amenity][amenity =~ /^(restaurant|cafe|fast_food)$/][!name][noname!=yes] {
351 throwOther: tr("{0} without {1}", "{0.tag}", "{2.key}");
352 group: tr("missing tag");
[6548]353 assertMatch: "node amenity=restaurant";
[7932]354 assertNoMatch: "node amenity=restaurant noname=yes";
[6548]355 assertNoMatch: "node amenity=restaurant name=Foobar";
356}
357
[13645]358/* #10193, #16157 */
[6550]359way[highway][barrier],
[8559]360*[highway][waterway][waterway!=dam][waterway!=weir],
[11429]361way[highway][natural][natural!=ridge],
[13645]362*[landuse][landuse!=retail][building] {
[11146]363 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
364 group: tr("suspicious tag combination");
[13645]365 assertNoMatch: "node highway=street_lamp natural=birds_nest";
[6548]366}
367
[10350]368/* #6932 */
[10798]369*[natural=water][leisure=swimming_pool] {
[6548]370 throwWarning: tr("natural water used for swimming pool");
[11146]371 group: tr("suspicious tag combination");
[7274]372 fixRemove: "natural";
[6548]373}
[6860]374
[10350]375/* #9593, #11183, #12418, #12761 */
[13291]376*[sport][sport!=skiing][!building][!club][tourism != hotel][highway != raceway][!leisure][natural !~ /^(beach|bare_rock|cliff|peak|water)$/][amenity !~ /^(pub|restaurant|swimming_pool)$/][landuse !~ /^(recreation_ground|piste|farm|farmland)$/][barrier !~ /^(wall|retaining_wall)$/][!"piste:type"][shop!=sports] {
[6860]377 throwWarning: tr("sport without physical feature");
[11146]378 group: tr("missing tag");
[6860]379 assertMatch: "node sport=tennis";
380 assertNoMatch: "node sport=tennis leisure=pitch";
381 assertNoMatch: "node sport=beachvolleyball natural=beach";
[11159]382 assertNoMatch: "node sport=skiing"; /* skiing has deprecated warning */
[6860]383 assertNoMatch: "node sport=swimming tourism=hotel";
384 assertNoMatch: "node sport=10pin amenity=restaurant";
[7243]385}
386
[13972]387/* {0.key} without {1.key} or {2.key} see #10140 */
388*[building:levels][!building][!building:part],
389way[usage][!railway][!waterway][route!=railway][man_made!=pipeline] {
[7243]390 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.key}");
[11146]391 group: tr("missing tag");
[7243]392}
[7488]393
[13981]394/* any other *_name tag (with some exceptions) but not a name , see #10837 #11297 #11539 #16437 */
395*[/_name$/][!name][!old_name][!loc_name][!uic_name][!artist_name][!lock_name][!"osak:municipality_name"][!"osak:street_name"][noname!=yes] {
[7818]396 throwWarning: tr("alternative name without {0}", "{1.key}");
[11146]397 group: tr("missing tag");
[7818]398}
399
[10350]400/* #10837 */
[9386]401way[destination][!oneway?][junction!=roundabout][highway] {
[7818]402 throwWarning: tr("incomplete usage of {0} on a way without {1}", "{0.key}", "{1.key}");
403 suggestAlternative: "destination:forward";
404 suggestAlternative: "destination:backward";
[8700]405}
406
[10350]407/* #11389 */
[8700]408way["maxspeed:forward"=*"maxspeed:backward"][!maxspeed] {
409 throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
410 suggestAlternative: "maxspeed";
[11146]411 group: tr("suspicious tag combination");
[8700]412 fixChangeKey: "maxspeed:forward=>maxspeed";
413 fixRemove: "maxspeed:backward";
414}
415way["maxspeed:forward"=*maxspeed]["maxspeed:backward"=*maxspeed][maxspeed] {
416 throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
417 set AllSameMaxspeed;
418 suggestAlternative: "maxspeed";
[11146]419 group: tr("suspicious tag combination");
[8700]420 fixRemove: "maxspeed:forward";
421 fixRemove: "maxspeed:backward";
422}
423way["maxspeed:forward"]["maxspeed:backward"][maxspeed]!.AllSameMaxspeed {
424 throwWarning: tr("{0} and {1} together with {2} and conflicting values", "{0.key}", "{1.key}", "{2.key}");
[11146]425 group: tr("suspicious tag combination");
[8700]426}
427way["maxspeed:forward"][maxspeed][!"maxspeed:backward"],
428way["maxspeed:backward"][maxspeed][!"maxspeed:forward"] {
429 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
[11146]430 group: tr("suspicious tag combination");
[8754]431}
432
[10350]433/* #11837 */
[8754]434way[layer][layer<0][bridge][bridge!=no][location!=underground][indoor!=yes][!tunnel],
435way[layer][layer>0][tunnel][tunnel!=no][location!=overground][indoor!=yes][!bridge] {
[11146]436 throwWarning: tr("{0} together with {1}", "{2.tag}", "{0.tag}");
437 group: tr("suspicious tag combination");
[10350]438}
439
440/* #12942 */
441relation[oneway][type!=route] {
442 throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}");
[10388]443}
444
445/* #9182 */
[10419]446way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) > 400] {
447 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]448 group: tr("suspicious tag combination");
[10388]449}
[10419]450way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) <= 400] {
451 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]452 group: tr("suspicious tag combination");
[10537]453}
454
[13102]455/* #13144, #15536 */
456*[unisex=yes][female=yes][male!=yes][shop=hairdresser],
457*[unisex=yes][male=yes][female!=yes][shop=hairdresser] {
[10537]458 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]459 group: tr("suspicious tag combination");
[10537]460}
[13102]461*[unisex=yes][female=yes][male=yes][shop=hairdresser] {
[10537]462 throwWarning: tr("{0} together with {1} and {2}. Remove {1} and {2}", "{0.tag}", "{1.tag}", "{2.tag}");
[11146]463 group: tr("suspicious tag combination");
[10537]464 fixRemove: "female";
465 fixRemove: "male";
466}
[13102]467*[female=yes][male=yes][!unisex][shop=hairdresser] {
[10537]468 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
469 suggestAlternative: "unisex=yes";
[11146]470 group: tr("suspicious tag combination");
[10537]471 fixRemove: "female";
472 fixRemove: "male";
473 fixAdd: "unisex=yes";
[10538]474}
475
[13972]476/* {1.key} without {2.tag} see #13138, 14468 */
[11687]477area:closed[water][natural!~/water|bay|strait/][water!=intermittent] { /* water=intermittent is deprecated and has an own warning */
[10538]478 throwWarning: tr("{0} without {1}", "{1.key}", "{2.tag}");
[11146]479 group: tr("missing tag");
[10538]480}
[11687]481way!:closed[water][natural!~/water|bay|strait/][water!=intermittent] {
[10538]482 throwWarning: tr("{0} without {1}", "{1.key}", "{2.tag}");
[11146]483 group: tr("missing tag");
[10995]484}
485
486/* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
487way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][turn:lanes ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
488way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][change:lanes ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
489way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][maxspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
490way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][minspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
491way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
492way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:ref:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
493way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
494 throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}");
[11146]495 group: tr("suspicious tag combination");
[11047]496}
497
498/* #13680 */
499area[golf=bunker][natural=beach] {
500 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
501 suggestAlternative: "natural=sand";
502 suggestAlternative: "surface=sand";
[11146]503 group: tr("suspicious tag combination");
[11080]504}
505
506/* #13705 */
507relation[type=multipolygon][building] > way {
508 set part_of_building_MP;
509}
510way["addr:housenumber"][!building][!"building:part"][!"demolished:building"][!note][!amenity][!leisure][!landuse][!man_made][!tourism][!barrier]!.part_of_building_MP {
511 /* don't exclude shop because a lot of real missing bulding tag cases have a shop tag. */
[11146]512 throwOther: tr("possibly missing {0} tag", "{1.key}");
513 group: tr("missing tag");
[11371]514}
515
[11529]516/* #14125, #14323 */
517way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][junction!=roundabout][lanes>2][get(split(".", tag(lanes)/2), 1)=5] {
[11406]518 throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}");
[11371]519 group: tr("missing tag");
520 assertNoMatch: "way highway=primary lanes=2";
521 assertNoMatch: "way highway=primary lanes=3 lanes:backward=2";
522 assertNoMatch: "way highway=primary lanes=3 oneway=-1";
[11406]523 assertNoMatch: "way highway=primary lanes=4";
[11371]524 assertMatch: "way highway=primary lanes=3";
[7818]525}
Note: See TracBrowser for help on using the repository browser.