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