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

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