| 1 |
*[access][highway=proposed], |
| 2 |
*[bridge=no], |
| 3 |
*[building=no], |
| 4 |
*[elevation="0"], |
| 5 |
*[layer="0"] { |
| 6 |
/* see #9365 - Useless tag layer=0 */ |
| 7 |
throwWarning: tr("{0} is unnecessary", "{0.tag}"); |
| 8 |
group: tr("unnecessary tag"); |
| 9 |
fixRemove: "{0.key}"; |
| 10 |
assertMatch: "way layer=0"; |
| 11 |
assertMatch: "way bridge=no"; |
| 12 |
assertMatch: "way highway=proposed access=no"; |
| 13 |
} |
| 14 |
|
| 15 |
/* #19996 */ |
| 16 |
*[motor_vehicle?][!vehicle][!access][bicycle_road!=yes][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link)$/] { |
| 17 |
throwOther: tr("{0} is optional on {1}", "{0.tag}", "{4.tag}"); |
| 18 |
assertMatch: "way highway=motorway motor_vehicle=yes"; |
| 19 |
assertNoMatch: "way highway=motorway access=no motor_vehicle=yes"; |
| 20 |
} |
| 21 |
|
| 22 |
/* #22338 */ |
| 23 |
way:closed[boundary][area?], |
| 24 |
way:closed[indoor ][area?][!highway][indoor!=no], |
| 25 |
way:closed[office ][area?], |
| 26 |
way:closed[place ][area?][!highway], |
| 27 |
way:closed[amenity ][area?][!highway], |
| 28 |
way:closed[building][area?], |
| 29 |
way:closed[landuse ][area?][!highway], |
| 30 |
way:closed[leisure ][area?][!highway][leisure!=track][leisure!=slipway], |
| 31 |
way:closed[natural ][area?], |
| 32 |
way:closed[shop ][area?] { |
| 33 |
throwWarning: tr("{0} is unnecessary for {1}", "{2.tag}", "{1.key}"); |
| 34 |
group: tr("unnecessary tag"); |
| 35 |
fixRemove: "{2.key}"; |
| 36 |
} |
| 37 |
|
| 38 |
/* #14256, #15664, #20681 */ |
| 39 |
way:closed[highway=rest_area][area?], |
| 40 |
way:closed[highway=services][area?], |
| 41 |
way:closed[aeroway=aerodrome][area?], |
| 42 |
way:closed[waterway=riverbank][area?], |
| 43 |
way:closed[aeroway=helipad][area?] { |
| 44 |
throwWarning: tr("{0} is unnecessary for {1}", "{2.tag}", "{1.tag}"); |
| 45 |
group: tr("unnecessary tag"); |
| 46 |
fixRemove: "{2.key}"; |
| 47 |
} |
| 48 |
|
| 49 |
*[gnis:Class="Populated Place"][place=city], |
| 50 |
*[gnis:Class="Populated Place"][place=town], |
| 51 |
*[gnis:Class="Populated Place"][place=village], |
| 52 |
*[gnis:Class="Populated Place"][place=hamlet], |
| 53 |
*[gnis:Class=Summit][natural=peak] { |
| 54 |
throwWarning: tr("{0} is unnecessary for {1}", "{0.tag}", "{1.tag}"); |
| 55 |
group: tr("unnecessary tag"); |
| 56 |
fixRemove: "{0.key}"; |
| 57 |
assertMatch: "node gnis:Class=\"Populated Place\" place=village"; |
| 58 |
assertNoMatch: "node gnis:Class=\"Populated Place\" place=locality"; |
| 59 |
} |
| 60 |
|
| 61 |
*[emergency=permissive] { |
| 62 |
/* see #9458 - emergency=permissive makes no sense */ |
| 63 |
throwWarning: tr("{0} makes no sense", "{0.tag}"); |
| 64 |
fixAdd: "emergency=yes"; |
| 65 |
assertMatch: "way emergency=permissive"; |
| 66 |
assertNoMatch: "way emergency=designated"; |
| 67 |
} |
| 68 |
|
| 69 |
/* see ticket #7639 -- Warn when a node has the same tags as its parent way. */ |
| 70 |
/* But don't warn on barrier tags -- a common mapping method will have a barrier on the routable way and then the micromapped barrier */ |
| 71 |
way[!barrier] >:sameTags node:tagged { |
| 72 |
throwWarning: tr("Nodes duplicating parent way tags"); |
| 73 |
} |
| 74 |
|
| 75 |
/* #15477 */ |
| 76 |
*[payment:cash][payment:coins][payment:notes] { |
| 77 |
throwWarning: tr("{0} together with {1} and {2}. Remove {0}.", "{0.key}", "{1.key}", "{2.key}"); |
| 78 |
group: tr("unnecessary tag"); |
| 79 |
fixRemove: "payment:cash"; |
| 80 |
} |
| 81 |
|
| 82 |
/* #15774 */ |
| 83 |
node[emergency=fire_hydrant][fire_hydrant:count=1] { |
| 84 |
throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}"); |
| 85 |
group: tr("unnecessary tag"); |
| 86 |
fixRemove: "{1.key}"; |
| 87 |
} |
| 88 |
|
| 89 |
/* #17100, #17471, #17629, #17633, #19274, #19395, #19409, #23596 */ |
| 90 |
*[name][name=~/^(?i)(library|biblioteca|biblioteka|bibliothek|bibliotheek)$/][amenity=library], |
| 91 |
*[name][name=~/^(?i)(parc|park)$/][leisure=park], |
| 92 |
*[name][name=~/^(?i)(pond)$/][water=pond], |
| 93 |
*[name][name=~/^(?i)(church|église|biserica)$/][amenity=place_of_worship][religion=christian], |
| 94 |
*[name][name=~/^(?i)(mosque|cami|masjid|مسجد)$/][amenity=place_of_worship][religion=muslim], |
| 95 |
*[name][name=~/^(?i)(parking|parkplatz)$/][amenity=parking], |
| 96 |
*[name][name=~/^(?i)(post office)$/][amenity=post_office], |
| 97 |
*[name][name=~/^(?i)(restaurant)$/][amenity=restaurant], |
| 98 |
*[name][name=~/^(?i)(toilets?)$/][amenity=toilets], |
| 99 |
*[name][name=~/^(?i)(playground|spielplatz)$/][leisure=playground], |
| 100 |
*[name][name=~/^(?i)(shop|boutique)$/][shop][shop!=no], |
| 101 |
*[name][name=~/^(?i)(building|bangunan|bâtiment|batiment)$/][building][building!=no], |
| 102 |
*[name][name=~/^(?i)(house|maison|rumah|vivienda)$/][building=house], |
| 103 |
*[name][name=~/^(?i)(casa)$/][building=house][outside("FR")], /* spanish for house but it is a brand name in France */ |
| 104 |
*[name][name=~/^(?i)(kiosk)$/][shop=kiosk][outside("NL")], /* it is a brand name in the Netherlands */ |
| 105 |
*[name][name=~/^(?i)(path)$/][highway=path], |
| 106 |
*[name][name=~/^(?i)(jalan)$/][highway], |
| 107 |
*[name][name=~/^(?i)(silo)$/][man_made=silo], |
| 108 |
*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][amenity=grave_yard], |
| 109 |
*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][landuse=cemetery], |
| 110 |
*[name][name=~/^(?i)(monument aux morts|war memorial)$/][historic=memorial][memorial=war_memorial], |
| 111 |
*[name][name=~/^(?i)(school|école|Школа)$/][amenity=school], |
| 112 |
*[name][name=~/^(?i)(école élémentaire)$/][amenity=school]["school:FR"="élémentaire"], |
| 113 |
*[name][name=~/^(?i)(école maternelle)$/][amenity=school]["school:FR"="maternelle"], |
| 114 |
*[name][name=~/^(?i)(école primaire)$/][amenity=school]["school:FR"="primaire"], |
| 115 |
*[name][name=~/^(?i)(collège)$/][amenity=school]["school:FR"="collège"], |
| 116 |
*[name][name=~/^(?i)(lycée)$/][amenity=school]["school:FR"="lycée"], |
| 117 |
*[name][name=~/^(?i)(Аптека|farmacia|pharmacy|pharmacie)$/][amenity=pharmacy], |
| 118 |
*[name][name=~/^(?i)(hydrant)$/][emergency=fire_hydrant], |
| 119 |
*[name][name=~/^(?i)(АГЗС|АЗС)$/][amenity=fuel] { |
| 120 |
throwWarning: tr("{0}", "{0.tag}"); |
| 121 |
group: tr("descriptive name"); |
| 122 |
fixRemove: "name"; |
| 123 |
assertMatch: "node name=parking amenity=parking"; |
| 124 |
assertMatch: "node name=Parking amenity=parking"; |
| 125 |
assertNoMatch: "node name=Parking_with_suffix amenity=parking"; |
| 126 |
assertNoMatch: "node name=Megaparking amenity=parking"; |
| 127 |
assertMatch: "relation name=parking amenity=parking type=multipolygon"; |
| 128 |
assertMatch: "relation name=Parking amenity=parking type=multipolygon"; |
| 129 |
assertNoMatch: "way name=parking"; |
| 130 |
assertMatch: "relation name=PLAYGROUND leisure=playground type=multipolygon"; |
| 131 |
assertMatch: "node name=PLaYGrOUNd leisure=playground"; |
| 132 |
assertMatch: "node name=shop shop=whatever"; |
| 133 |
assertNoMatch: "node name=shop shop=no"; |
| 134 |
assertNoMatch: "way name=shop leisure=playground"; |
| 135 |
assertMatch: "way name=building building=yes"; |
| 136 |
assertMatch: "way name=building building=house"; |
| 137 |
assertMatch: "way name=Rumah building=house"; |
| 138 |
assertNoMatch: "way name=Rumah building=yes"; |
| 139 |
assertMatch: "way name=house building=house"; |
| 140 |
assertNoMatch: "way name=house building=yes"; |
| 141 |
assertMatch: "way name=kiosk building=yes shop=kiosk"; |
| 142 |
assertNoMatch: "way name=kiosk building=yes"; |
| 143 |
assertMatch: "way name=silo man_made=silo"; |
| 144 |
assertMatch: "way name=Silo man_made=silo building=silo"; |
| 145 |
assertNoMatch: "way name=Silo building=silo"; |
| 146 |
assertMatch: "way name=cemetery amenity=grave_yard"; |
| 147 |
assertMatch: "way name=Cmentarz amenity=grave_yard"; |
| 148 |
assertNoMatch: "way name=kiosk amenity=grave_yard"; |
| 149 |
} |
| 150 |
/* the following without fixRemove to avoid information loss, should be checked manually */ |
| 151 |
*[name][name=~/^(?i)(chapel|chapelle|kapelle)$/][tag("building")=="chapel"||tag("amenity")=="place_of_worship"], /* check if amenity=place_of_worship and/or building=chapel applies */ |
| 152 |
*[name][name=~/^(?i)(silo)$/][man_made!=silo], /* check if man_made=silo and/or building=silo applies */ |
| 153 |
*[name][name=~/^(?i)(school|école|Школа)$/][amenity!=school], /* check if amenity=school and/or building=school applies applies */ |
| 154 |
*[name][name=~/^(?i)(house|rumah|vivienda)$/][building][building!=house][building!=no], /* check if building=house applies */ |
| 155 |
*[name][name=~/^(?i)(casa)$/][building][building!=house][building!=no][outside("FR")] { /* check if building=house applies */ |
| 156 |
throwWarning: tr("{0}", "{0.tag}"); |
| 157 |
group: tr("descriptive name"); |
| 158 |
assertMatch: "way name=Silo building=silo"; |
| 159 |
assertNoMatch: "way name=building building=yes"; |
| 160 |
assertNoMatch: "way name=building building=house"; |
| 161 |
assertNoMatch: "way name=Rumah building=house"; |
| 162 |
assertMatch: "way name=Rumah building=yes"; |
| 163 |
assertNoMatch: "way name=house building=house"; |
| 164 |
assertMatch: "way name=house building=yes"; |
| 165 |
} |
| 166 |
|
| 167 |
/* #2760 */ |
| 168 |
*[/^gpx:/], |
| 169 |
*[/^gpxx:/], |
| 170 |
*[/^gpxd:/] { |
| 171 |
throwWarning: tr("{0} should not be uploaded", "{0.key}"); |
| 172 |
group: tr("unnecessary tag"); |
| 173 |
fixRemove: "{0.key}"; |
| 174 |
assertMatch: "node gpx:time=2018-01-01T12:00:00Z"; |
| 175 |
assertMatch: "node gpxd:color=#FF0000"; |
| 176 |
assertNoMatch: "node source=gpx:foo"; |
| 177 |
} |