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

Last change on this file since 13508 was 13508, checked in by Klumbumbus, 7 months ago

fix #16055 - don't warn about missing tourism=artwork if exhibit=artwork is present

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