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

Last change on this file since 13814 was 13814, checked in by Don-vip, 10 months ago

fix #15367 - Power transformer extension

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