| 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 | way >:sameTags node:tagged { |
|---|
| 71 | throwWarning: tr("Nodes duplicating parent way tags"); |
|---|
| 72 | } |
|---|
| 73 | |
|---|
| 74 | /* #15477 */ |
|---|
| 75 | *[payment:cash][payment:coins][payment:notes] { |
|---|
| 76 | throwWarning: tr("{0} together with {1} and {2}. Remove {0}.", "{0.key}", "{1.key}", "{2.key}"); |
|---|
| 77 | group: tr("unnecessary tag"); |
|---|
| 78 | fixRemove: "payment:cash"; |
|---|
| 79 | } |
|---|
| 80 | |
|---|
| 81 | /* #15774 */ |
|---|
| 82 | node[emergency=fire_hydrant][fire_hydrant:count=1] { |
|---|
| 83 | throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}"); |
|---|
| 84 | group: tr("unnecessary tag"); |
|---|
| 85 | fixRemove: "{1.key}"; |
|---|
| 86 | } |
|---|
| 87 | |
|---|
| 88 | /* #17100, #17471, #17629, #17633, #19274, #19395, #19409 */ |
|---|
| 89 | *[name][name=~/^(?i)(library|biblioteca|biblioteka|bibliothek|bibliotheek)$/][amenity=library], |
|---|
| 90 | *[name][name=~/^(?i)(parc|park)$/][leisure=park], |
|---|
| 91 | *[name][name=~/^(?i)(pond)$/][water=pond], |
|---|
| 92 | *[name][name=~/^(?i)(church|église|biserica)$/][amenity=place_of_worship][religion=christian], |
|---|
| 93 | *[name][name=~/^(?i)(mosque|cami|masjid|مسجد)$/][amenity=place_of_worship][religion=muslim], |
|---|
| 94 | *[name][name=~/^(?i)(parking|parkplatz)$/][amenity=parking], |
|---|
| 95 | *[name][name=~/^(?i)(post office)$/][amenity=post_office], |
|---|
| 96 | *[name][name=~/^(?i)(restaurant)$/][amenity=restaurant], |
|---|
| 97 | *[name][name=~/^(?i)(toilets?)$/][amenity=toilets], |
|---|
| 98 | *[name][name=~/^(?i)(playground|spielplatz)$/][leisure=playground], |
|---|
| 99 | *[name][name=~/^(?i)(shop|boutique)$/][shop][shop!=no], |
|---|
| 100 | *[name][name=~/^(?i)(building|bangunan)$/][building][building!=no], |
|---|
| 101 | *[name][name=~/^(?i)(house|maison|rumah|vivienda)$/][building=house], |
|---|
| 102 | *[name][name=~/^(?i)(casa)$/][building=house][outside("FR")], /* spanish for house but it is a brand name in France */ |
|---|
| 103 | *[name][name=~/^(?i)(kiosk)$/][shop=kiosk][outside("NL")], /* it is a brand name in the Netherlands */ |
|---|
| 104 | *[name][name=~/^(?i)(path)$/][highway=path], |
|---|
| 105 | *[name][name=~/^(?i)(jalan)$/][highway], |
|---|
| 106 | *[name][name=~/^(?i)(silo)$/][man_made=silo], |
|---|
| 107 | *[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][amenity=grave_yard], |
|---|
| 108 | *[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][landuse=cemetery], |
|---|
| 109 | *[name][name=~/^(?i)(monument aux morts|war memorial)$/][historic=memorial][memorial=war_memorial], |
|---|
| 110 | *[name][name=~/^(?i)(school|école|Школа)$/][amenity=school], |
|---|
| 111 | *[name][name=~/^(?i)(école élémentaire)$/][amenity=school]["school:FR"="élémentaire"], |
|---|
| 112 | *[name][name=~/^(?i)(école maternelle)$/][amenity=school]["school:FR"="maternelle"], |
|---|
| 113 | *[name][name=~/^(?i)(école primaire)$/][amenity=school]["school:FR"="primaire"], |
|---|
| 114 | *[name][name=~/^(?i)(collège)$/][amenity=school]["school:FR"="collège"], |
|---|
| 115 | *[name][name=~/^(?i)(lycée)$/][amenity=school]["school:FR"="lycée"], |
|---|
| 116 | *[name][name=~/^(?i)(Аптека|farmacia|pharmacy|pharmacie)$/][amenity=pharmacy], |
|---|
| 117 | *[name][name=~/^(?i)(hydrant)$/][emergency=fire_hydrant], |
|---|
| 118 | *[name][name=~/^(?i)(АГЗС|АЗС)$/][amenity=fuel] { |
|---|
| 119 | throwWarning: tr("{0}", "{0.tag}"); |
|---|
| 120 | group: tr("descriptive name"); |
|---|
| 121 | fixRemove: "name"; |
|---|
| 122 | assertMatch: "node name=parking amenity=parking"; |
|---|
| 123 | assertMatch: "node name=Parking amenity=parking"; |
|---|
| 124 | assertNoMatch: "node name=Parking_with_suffix amenity=parking"; |
|---|
| 125 | assertNoMatch: "node name=Megaparking amenity=parking"; |
|---|
| 126 | assertMatch: "relation name=parking amenity=parking type=multipolygon"; |
|---|
| 127 | assertMatch: "relation name=Parking amenity=parking type=multipolygon"; |
|---|
| 128 | assertNoMatch: "way name=parking"; |
|---|
| 129 | assertMatch: "relation name=PLAYGROUND leisure=playground type=multipolygon"; |
|---|
| 130 | assertMatch: "node name=PLaYGrOUNd leisure=playground"; |
|---|
| 131 | assertMatch: "node name=shop shop=whatever"; |
|---|
| 132 | assertNoMatch: "node name=shop shop=no"; |
|---|
| 133 | assertNoMatch: "way name=shop leisure=playground"; |
|---|
| 134 | assertMatch: "way name=building building=yes"; |
|---|
| 135 | assertMatch: "way name=building building=house"; |
|---|
| 136 | assertMatch: "way name=Rumah building=house"; |
|---|
| 137 | assertNoMatch: "way name=Rumah building=yes"; |
|---|
| 138 | assertMatch: "way name=house building=house"; |
|---|
| 139 | assertNoMatch: "way name=house building=yes"; |
|---|
| 140 | assertMatch: "way name=kiosk building=yes shop=kiosk"; |
|---|
| 141 | assertNoMatch: "way name=kiosk building=yes"; |
|---|
| 142 | assertMatch: "way name=silo man_made=silo"; |
|---|
| 143 | assertMatch: "way name=Silo man_made=silo building=silo"; |
|---|
| 144 | assertNoMatch: "way name=Silo building=silo"; |
|---|
| 145 | assertMatch: "way name=cemetery amenity=grave_yard"; |
|---|
| 146 | assertMatch: "way name=Cmentarz amenity=grave_yard"; |
|---|
| 147 | assertNoMatch: "way name=kiosk amenity=grave_yard"; |
|---|
| 148 | } |
|---|
| 149 | /* the following without fixRemove to avoid information loss, should be checked manually */ |
|---|
| 150 | *[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 */ |
|---|
| 151 | *[name][name=~/^(?i)(silo)$/][man_made!=silo], /* check if man_made=silo and/or building=silo applies */ |
|---|
| 152 | *[name][name=~/^(?i)(school|école|Школа)$/][amenity!=school], /* check if amenity=school and/or building=school applies applies */ |
|---|
| 153 | *[name][name=~/^(?i)(house|rumah|vivienda)$/][building][building!=house][building!=no], /* check if building=house applies */ |
|---|
| 154 | *[name][name=~/^(?i)(casa)$/][building][building!=house][building!=no][outside("FR")] { /* check if building=house applies */ |
|---|
| 155 | throwWarning: tr("{0}", "{0.tag}"); |
|---|
| 156 | group: tr("descriptive name"); |
|---|
| 157 | assertMatch: "way name=Silo building=silo"; |
|---|
| 158 | assertNoMatch: "way name=building building=yes"; |
|---|
| 159 | assertNoMatch: "way name=building building=house"; |
|---|
| 160 | assertNoMatch: "way name=Rumah building=house"; |
|---|
| 161 | assertMatch: "way name=Rumah building=yes"; |
|---|
| 162 | assertNoMatch: "way name=house building=house"; |
|---|
| 163 | assertMatch: "way name=house building=yes"; |
|---|
| 164 | } |
|---|
| 165 | |
|---|
| 166 | /* #2760 */ |
|---|
| 167 | *[/^gpx:/], |
|---|
| 168 | *[/^gpxx:/], |
|---|
| 169 | *[/^gpxd:/] { |
|---|
| 170 | throwWarning: tr("{0} should not be uploaded", "{0.key}"); |
|---|
| 171 | group: tr("unnecessary tag"); |
|---|
| 172 | fixRemove: "{0.key}"; |
|---|
| 173 | assertMatch: "node gpx:time=2018-01-01T12:00:00Z"; |
|---|
| 174 | assertMatch: "node gpxd:color=#FF0000"; |
|---|
| 175 | assertNoMatch: "node source=gpx:foo"; |
|---|
| 176 | } |
|---|