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

Last change on this file was 14593, checked in by Klumbumbus, 4 weeks ago

fix #15774 - Update emergency=fire_hydrant preset (based on patch by elgolfo and bus-mt), add a bunch of validator checks

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