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