source: josm/trunk/resources/data/validator/combinations.mapcss@ 19602

Last change on this file since 19602 was 19602, checked in by stoecker, 3 days ago

fix #24114 - patch by francois.lacombe - Validate location:transition=yes as incompatible with line_management=termination

  • Property svn:eol-style set to native
File size: 60.6 KB
RevLine 
[6548]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
[15268]5way[surface=~/^(unpaved|compacted|gravel|fine_gravel|pebblestone|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$/] { /* without grass_paver as it is controversial */
6 set unpaved_surface;
7}
[18527]8way[surface=~/^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$/] {
9 set fully_paved_surface;
10}
[15268]11
[7229]12/* {0.key} without {1.key} (warning level) */
[18535]13node[voltage:primary ][!transformer],
14node[voltage:secondary ][!transformer],
15node[voltage:tertiary ][!transformer],
[16233]16way[junction ][!highway][junction!=yes][!area:highway],
[11305]17way[living_street ][!highway],
18way[maintenance ][!highway],
19way[median ][!highway],
20way[motorroad ][!highway],
21node[ntd_id ][!highway],
22way[sac_scale ][!highway],
23way[sidewalk ][!highway],
[13566]24way[step_count ][!highway][man_made!=tower],
[11305]25way[tracktype ][!highway],
[13092]26way[trail_visibility ][!highway], /* #15029 */
[11305]27way[trolley_wire ][!highway],
28way[zip_left ][!highway],
29way[zip_right ][!highway],
30way[detail ][!railway][route!=railway],
31way[eddy_current_brake ][!railway][route!=railway],
[13452]32way[electrified ][!railway][route!=railway][!highway], /* #16007 */
[11305]33way[etcs ][!railway][route!=railway],
34way[gauge ][!railway][route!=railway],
35way[grade_of_track ][!railway][route!=railway],
36way[kursbuchstrecke ][!railway][route!=railway],
37way[lzb ][!railway][route!=railway],
38way[old_railway_operator ][!railway][route!=railway],
39way[operating_procedure ][!railway][route!=railway],
40way[pzb ][!railway][route!=railway],
41way[structure_gauge ][!railway][route!=railway],
42way[tilting_technology ][!railway][route!=railway],
43way[track_class ][!railway][route!=railway],
44way[tracks ][!railway][route!=railway],
45way[traffic_mode ][!railway][route!=railway],
46way[workrules ][!railway][route!=railway],
47way[length_unit ][!waterway],
48way[canal ][!waterway],
49way[have_riverbank ][!waterway],
[18731]50area[min_height ][!height][/^(building|building:part)$/], /* #21286 */
51area[building:min_level ][!building:levels][/^(building|building:part)$/], /* #21286 */
[6548]52*[border_type ][!boundary],
[8121]53*[piste:difficulty ][!piste:type],
[17448]54*[place ][!name][place!=islet][place!=plot][noname!=yes],
[15260]55*[transformer ][!power],
[6548]56*[source:date ][!source],
[16255]57*[source:name ][!name][noname!=yes],
[13032]58*[source:maxspeed:forward ][!maxspeed:forward][!maxspeed],
59*[source:maxspeed:backward ][!maxspeed:backward][!maxspeed],
[6548]60*[source:building ][!building],
[16255]61*[source:ref ][!ref][noref!=yes],
[6548]62*[source:population ][!population],
63*[source:postal_code ][!postal_code],
64*[source:ele ][!ele],
65*[source:ref:INSEE ][!ref:INSEE],
66*[source:lit ][!lit],
67*[source:hgv ][!hgv],
68*[source:highway ][!highway],
69*[source:maxaxleload ][!maxaxleload],
70*[source:surface ][!surface],
71*[source:bridge ][!bridge],
72*[source:old_name ][!old_name],
73*[source:bicycle ][!bicycle],
74*[source:designation ][!designation],
75*[source:height ][!height],
76*[source:lanes ][!lanes],
[6645]77*[source:postcode ][!addr:postcode],
78*[source:housenumber ][!addr:housenumber],
79*[source:addr:postcode ][!addr:postcode],
[16255]80*[source:addr:housenumber ][!addr:housenumber] {
[6548]81 throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
[11146]82 group: tr("missing tag");
[6548]83 assertMatch: "node source:addr:postcode=postman";
84}
85
[18370]86/* {0.key} without {1.key} (info level), #21736 */
[11305]87way[lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1],
88way[lanes:backward][!lanes:forward][oneway!=yes][oneway!=-1],
[18370]89way[lanes:forward][!lanes:backward][oneway=~/^(yes|-1)$/][/^oneway:(psv|bus)$/=~/^no$/],
90way[lanes:backward][!lanes:forward][oneway=~/^(yes|-1)$/][/^oneway:(psv|bus)$/=~/^no$/],
[7229]91*[leaf_type ][!leaf_cycle],
92*[leaf_cycle][!leaf_type] {
93 throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
[11146]94 group: tr("missing tag");
[7229]95}
96
[15267]97/* {0.key} without {1.tag}, #17997 */
[15433]98node[railway:switch ][railway!=switch],
[15267]99*[generator:source ][power!=generator],
100*[generator:method ][power!=generator],
101*[generator:type ][power!=generator],
[14593]102node[fire_hydrant:type ][emergency!=fire_hydrant][disused:emergency!=fire_hydrant],
[15260]103node[manhole ][man_made!=manhole],
[11305]104way[fence_type ][barrier!=fence],
[6548]105*[recycling_type ][amenity!=recycling],
[7996]106*[information ][tourism!=information],
[11305]107node[board_type ][information!=board],
[6548]108*[shelter_type ][amenity!=shelter],
[11305]109node[lamp_type ][highway!=street_lamp],
110node[map_type ][information!=map],
[18633]111*[archaeological_site ][historic!=archaeological_site],
[13508]112*[artwork_type ][tourism!=artwork][exhibit!=artwork],
[6548]113*[castle_type ][historic!=castle],
[15624]114*[parking ][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/][parking!=yes][parking!=no],
[11305]115way[cutline ][man_made!=cutline],
[17480]116*[zoo ][tourism!=zoo],
[6548]117*[bunker_type ][military!=bunker] {
118 throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
[11146]119 group: tr("missing tag");
[6548]120}
121
[18734]122/* #20742 - No warning about barrier with inappropriate access tags on highway, #22739 */
123way[highway=~/^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link)$/][!access][!vehicle] > node[barrier][barrier!~/entrance|border_control|cattle_grid|height_restrictor|toll_booth/][!access][!motor_vehicle][!vehicle] {
[18231]124 throwWarning: tr("{0} without access tags such as {1}, {2}, or {3}.", "{0.tag}", "{2.key}", "{3.key}", "{4.key}");
125 group: tr("suspicious barrier");
126}
127
128way[highway=~/^(footway|path|bridleway|cycleway|service)$/] > node[barrier]:connection {
129 set barrierSmallRoadConnection;
130}
131
132way[highway=~/^(unclassified|residential)$/] >[index = 1] node.barrierSmallRoadConnection,
133way[highway=~/^(unclassified|residential)$/] >[index = -1] node.barrierSmallRoadConnection {
134 set barrierAllowedAtConnection;
135}
136
137/* 20742; warnings for major roads set by other rule, also issue 20742 */
138way[highway=~/^(unclassified|residential)$/] > node[barrier][barrier!=bollard][!access][!access:conditional][!vehicle][!vehicle:conditional][!motor_vehicle][!motor_vehicle:conditional].barrierSmallRoadConnection!.barrierAllowedAtConnection {
139 throwWarning: tr("Suspicious {0} on a connection of a small highway with a larger highway", "{0.tag}");
140 set hasWarningForBarrierOnWay;
141 group: tr("suspicious barrier");
142}
143
144way[highway=~/^(unclassified|residential)$/] > node[barrier].barrierSmallRoadConnection!.hasWarningForBarrierOnWay {
145 throwOther: tr("Suspicious {0} on a connection of a small highway with a larger highway", "{0.tag}");
146 group: tr("suspicious barrier");
147}
148
[17410]149/* {0.key} without {1.tag} or {2.tag} */
[12677]150*[bridge:movable ][bridge!=movable][man_made!=bridge],
[13972]151*[reservoir_type ][landuse!=reservoir][water!=reservoir],
152way[waterway=pressurised ][tunnel!=flooded][man_made!=pipeline] {
[9903]153 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.tag}", "{2.tag}");
[11146]154 group: tr("missing tag");
[9903]155}
156
[19590]157/* {0.key} without {1.tag}, {2.tag} or {3.tag}, #15107, #20241, #20421 */
[17410]158*[iata ][aeroway!=aerodrome][aeroway!=heliport][aeroway!=helipad],
[19590]159*[icao ][aeroway!=aerodrome][aeroway!=heliport][aeroway!=helipad],
160*[substation ][power!=substation][power!~/pole|tower/][pipeline!=substation] {
[17410]161 throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.tag}", "{2.tag}", "{3.tag}");
162 group: tr("missing tag");
163}
164
[18230]165/* {0.key} without {1.tag}, {2.tag}, {3.tag} or {4.tag}, #20530 */
166*[pump_mechanism][man_made!=pump][man_made!=windpump][man_made!=water_well][man_made!=petroleum_well] {
167 throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.tag}", "{2.tag}", "{3.tag}", "{4.tag}");
168 group: tr("missing tag");
169}
170
[18397]171/* {0.tag} without {1.key} (warning level), #18411, #18246, #20530, #20960 */
172way[railway=construction][!construction][!construction:railway],
173way[highway=construction][!construction][!construction:highway],
174area[building=construction][!construction][!construction:building],
175area[landuse=construction][!construction][!construction:landuse],
[17218]176node[traffic_sign=maxspeed][!maxspeed][!/^maxspeed:.+/],
[18230]177*[actuator=manual][!handle],
178*[mechanical_driver=manual][!handle],
[14593]179node[emergency=fire_hydrant][!fire_hydrant:type],
[14800]180way[ boundary=administrative][!admin_level],
[13084]181relation[boundary=administrative][!admin_level],
[14798]182relation[route=bicycle ][!network][type=route],
183relation[route=hiking ][!network][type=route],
184relation[route=foot ][!network][type=route],
185relation[route=horse ][!network][type=route],
[10320]186relation[route=piste][!piste:type][type=route],
[14798]187relation[route=ski ][!piste:type][type=route],
[7996]188*[tourism=information][!information],
[11153]189*[leisure=pitch][!sport],
[7929]190*[aeroway=terminal][!building],
[15634]191*[office=government][!government],
[7967]192*[power=generator][!generator:source],
[11398]193*[amenity=social_facility][!social_facility],
[16705]194*[amenity=place_of_worship][!religion],
195*[man_made=tower][!tower:type] {
[7923]196 throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
[11146]197 group: tr("missing tag");
[17218]198 assertNoMatch: "node traffic_sign=maxspeed maxspeed:hgv:conditional=\"80 @ (weight>7.5 AND 22:00-05:00)\"";
[7923]199}
200
[15325]201/* {0.tag} without {1.key} (info level), #15107 */
202*[aeroway=runway ][!ref],
203*[aeroway=runway ][!surface],
[15635]204node[highway=crossing ][!crossing],
[11428]205way[highway=track ][!tracktype],
[9495]206way[power=cable ][!location],
[13814]207node[power=transformer ][!voltage:primary],
208node[power=transformer ][!voltage:secondary],
209node[transformer=distribution ][!voltage:primary][power=pole],
210node[transformer=distribution ][!voltage:secondary][power=pole],
[9500]211way[power=line ][!voltage],
212way[power=minor_line ][!voltage],
213way[power=cable ][!voltage],
214*[power=generator ][!voltage][generator:output:electricity],
215*[power=plant ][!voltage][plant:output:electricity],
216*[power=substation ][!substation],
[12997]217*[power=switch ][!switch],
[9500]218*[power=transformer ][!transformer],
[14799]219*[amenity=bank ][!operator],
220*[amenity=cinema ][!operator],
221*[amenity=fast_food ][!operator],
222*[amenity=fuel ][!operator],
223*[mountain_pass=yes ][!ele],
224*[natural=peak ][!ele],
[15568]225*[natural=water ][!water],
[14818]226*[amenity=place_of_worship ][!denomination],
[8080]227*[amenity=parking ][!parking],
228*[amenity=parking_entrance ][!parking] {
229 throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
[11146]230 group: tr("missing tag");
[9500]231 assertMatch: "way power=line";
232 assertNoMatch: "way power=line voltage=1";
[12997]233 assertMatch: "way power=switch";
[9500]234 assertMatch: "way power=substation";
235 assertMatch: "way power=substation transformer=foobar";
236 assertNoMatch: "way power=substation substation=foobar";
237 assertMatch: "way power=generator generator:output:electricity=yes";
238 assertNoMatch: "way power=generator";
239 assertNoMatch: "way power=generator generator:output:electricity=yes voltage=1";
[8080]240}
241
[18660]242/* {0.key} without {1.key} or {2.tag} */
[13026]243way[bridge:structure ][!bridge][man_made!=bridge],
[9003]244*[segregated ][!highway][railway!=crossing] {
[6548]245 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
[11146]246 group: tr("missing tag");
[6548]247}
[18660]248/* {0.key} without {1.key} or {2.tag}, #22547 */
[18659]249way[tunnel=culvert][man_made!=tunnel][!waterway] {
250 throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.key}");
251 group: tr("suspicious tag combination");
252 set TunnelCulvertWithoutWaterway;
253}
[6548]254
[8746]255/* {0.tag} without {1.tag} (info level) see #11600 #11393 #11850 */
[11305]256way[highway=motorway][!oneway][junction!=roundabout],
257way[highway=motorway_link][!oneway][junction!=roundabout] {
[8591]258 throwOther: tr("{0} without {1}", "{0.tag}", "{1.tag}");
[11146]259 group: tr("missing tag");
[8545]260}
261
[13972]262/* {0.tag} without {1.tag} */
263way[usage=penstock][man_made!=pipeline],
264way[usage=penstock][waterway!=pressurised] {
265 throwWarning: tr("{0} without {1}", "{0.tag}", "{1.tag}");
266 group: tr("missing tag");
267}
268
[8411]269/* {0.tag} without {1.tag} or {2.tag} */
270*[amenity=recycling][recycling_type!=container][recycling_type!=centre] {
271 throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.tag}");
[11146]272 group: tr("missing tag");
[8411]273}
274
[17324]275/* {0.key} without {1.key}, {2.tag}, {3.tag} or {4.key} */
276*[smoothness][!highway][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking)$/][barrier!=kerb][!kerb] {
277 throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.key}");
278 group: tr("missing tag");
279}
280
281/* {0.key} without {1.key}, {2.tag}, {3.tag} or {4.tag} */
[17923]282*[intermittent ][!waterway][natural!~/^(water|spring)$/][landuse!~/^(basin|reservoir)$/][ford!~/^(yes|stepping_stones)$/],
[14127]283*[boat ][!waterway][natural!=water ][landuse!~/^(basin|reservoir)$/][ford!=yes] {
284 throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.tag}");
[11146]285 group: tr("missing tag");
[7767]286}
287
[18463]288/* {0.key} without {1.key}, {2.key} or {3.key} */
[14735]289*[snowplowing][!highway][!amenity][!leisure] {
[6880]290 throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
[11146]291 group: tr("missing tag");
[6880]292}
293
[16859]294/* {0.key} without {1.key}, {2.key} or {3.tag} */
[7250]295*[toll ][!highway][!barrier][route!~/^(ferry|road)$/] {
296 throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.tag}");
[11146]297 group: tr("missing tag");
[7250]298}
299
[18674]300/* {0.tag} together with {1.key}, see #22576, #17664, #17707, #16464, #10837, #14034, #9389, #11977, #13156, #16888, #20530, #21736, #22076, #21778 */
[18626]301*[amenity=marketplace][highway],
[15110]302*[power=plant][/^generator:/],
303*[power=generator][/^plant:/],
[15075]304*[power=plant][voltage],
305*[power=plant][frequency],
[14042]306*[internet_access=no][internet_access:fee],
[13814]307node[power=transformer][voltage],
308node[transformer=distribution][voltage][power=pole],
[19467]309relation[power=circuit][wires],
310relation[power=line_section][wires],
[11346]311*[amenity=vending_machine][shop],
[13401]312*[noname?][name],
[18460]313*[noref?][ref],
314*[nohousenumber?][addr:housenumber],
[18230]315*[actuator][handle][actuator !~ /(^|;)manual(;|$)/],
316*[mechanical_driver][handle][mechanical_driver !~ /(^|;)manual(;|$)/],
[18674]317way[oneway? ][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath][/^oneway:(bicycle|bus|mofa|moped|psv)$/!~/^no$/][!/^oneway:(.+:)?conditional$/],
318way[oneway? ][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][/^oneway:(bicycle|bus|mofa|moped|psv)$/!~/^no$/][!/^oneway:(.+:)?conditional$/],
319way[oneway=-1][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath][/^oneway:(bicycle|bus|mofa|moped|psv)$/!~/^no$/][!/^oneway:(.+:)?conditional$/],
320way[oneway=-1][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][/^oneway:(bicycle|bus|mofa|moped|psv)$/!~/^no$/][!/^oneway:(.+:)?conditional$/] {
[8077]321 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
[11146]322 group: tr("suspicious tag combination");
[15110]323 assertMatch: "way power=plant generator:source=wind";
324 assertMatch: "way power=generator plant:source=combustion";
[18674]325 assertMatch: "way oneway=yes bicycle:backward=destination";
326 assertNoMatch: "way oneway=-1 bicycle:forward=destination oneway:bicycle=no";
327 assertNoMatch: "way oneway=yes bicycle:backward=destination oneway:bicycle=no";
328 assertNoMatch: "way oneway=yes bicycle:backward:conditional=\"yes @ (Mo-Fr)\" oneway:bicycle:conditional=\"no @ (Mo-Fr)\"";
[8077]329}
330
[8044]331/* {0.tag} together with {1.tag} (info level), see #9696 */
[11305]332way[highway=footway][oneway=no] {
[8044]333 throwOther: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]334 group: tr("suspicious tag combination");
[8044]335}
336
[19602]337/* {0.tag} together with {1.tag}, see #18411, #17950, #17330, #17623, #17592, #17594, #17542, #16861, #16147, #10186, #18815, #20960, #24114 */
[15648]338*[barrier=kerb][kerb=no],
[18397]339way[highway=construction][construction][construction=~/^(yes|minor|no)$/],
340way[railway=construction][construction][construction=~/^(yes|minor|no)$/],
341area[building=construction][construction][construction=~/^(yes|minor|no)$/],
342area[landuse=construction][construction][construction=~/^(yes|minor|no)$/],
[15595]343*[man_made=bridge][bridge=yes],
344*[man_made=tunnel][tunnel=yes],
[15307]345*[amenity=police][police],
[15286]346node[highway=crossing][crossing=no],
347node[railway=crossing][crossing=no],
[15094]348way[junction=yes][highway],
[15268]349way[tracktype=grade1][surface].unpaved_surface,
[19337]350way[tracktype=grade2][surface][surface=~/^(sand|mud|earth|dirt|grass|ice|salt|snow|woodchips)$/],
[18527]351way[tracktype=grade4][surface].fully_paved_surface,
352way[tracktype=grade5][surface].fully_paved_surface,
[14356]353way[segregated][bicycle=no],
354way[segregated][foot=no],
[19602]355way[man_made=pipeline][tunnel=flooded],
356*[line_management=termination][location:transition=yes] {
[8117]357 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]358 group: tr("suspicious tag combination");
[8117]359}
360
[14808]361/* {0.tag} together with {1.tag} (error level) */
362relation[type=multipolygon][area=no] {
363 throwError: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
364 group: tr("suspicious tag combination");
365}
366
[18535]367/* {0.key} together with {1.key}, #18267, #17630, #17604, #21836 */
368node[transformer][voltage],
[15526]369node[marker][cover],
[15004]370*[building:part][building],
[15256]371*[addr:street][addr:place][outside("CZ,DK")] {
[14998]372 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
[13401]373 group: tr("suspicious tag combination");
374}
375
[15722]376/* {0.tag} together with {1.tag} and {2.key}, #18471 */
377way[highway=~/^(cycleway|footway|path)$/][segregated=no][sidewalk =~/^(left|right|both)$/] {
378 throwWarning: tr("{0} together with {1} and {2}", "{0.tag}", "{1.tag}", "{2.key}");
379 group: tr("suspicious tag combination");
380}
381
[17025]382/* {0.key} together with {1.tag} and {2.key}, #19747 */
383way[railway][electrified=no][frequency],
384way[railway][electrified=no][voltage] {
385 throwWarning: tr("{0} together with {1} and {2}", "{0.key}", "{1.tag}", "{2.key}");
386 group: tr("suspicious tag combination");
387}
388
[11074]389/* #11127, #13727 */
390way[waterway][bridge=yes][waterway!=weir] {
[8089]391 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.tag}");
392 suggestAlternative: "bridge=aqueduct";
[11146]393 group: tr("suspicious tag combination");
[8089]394 fixAdd: "bridge=aqueduct";
395}
[11074]396way[waterway=weir][bridge=yes][highway] {
397 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
398 suggestAlternative: "waterway=weir + ford=yes";
399 suggestAlternative: "waterway=dam";
400 suggestAlternative: tr("two objects, one with {0} and one with {1} + {2} + {3}", "{0.tag}", "{2.key}", "{1.tag}", "layer");
[11146]401 group: tr("suspicious tag combination");
[11074]402}
[8089]403
[13787]404/* #16214 */
405relation[type=multipolygon] >[role="inner"] way[area][eval(number_of_tags()) = 1] {
406 throwWarning: tr("{0} on an inner multipolygon ring without further tags", "{0.tag}");
407 fixRemove: "area";
408 set area_yes_autofix;
409 group: tr("suspicious tag combination");
410}
411
[17957]412/* only {0.key}, #11104, #12422, #14950, #19572, #20902 */
413/* relations excluded as there is a test for missing type=* plus several other test depending on the type exist */
414node[access][eval(number_of_tags()) = 1],
415way[access][eval(number_of_tags()) = 1],
416node[area][eval(number_of_tags()) = 1]!.area_yes_autofix,
417way[area][eval(number_of_tags()) = 1]!.area_yes_autofix,
418node[lanes][eval(number_of_tags()) = 1],
419way[lanes][eval(number_of_tags()) = 1],
420node[layer][eval(number_of_tags()) = 1],
421way[layer][eval(number_of_tags()) = 1],
422way[level][eval(number_of_tags()) = 1], /* nodes might be valid, e.g. start and end nodes of steps */
423node[lit][eval(number_of_tags()) = 1],
424way[lit][eval(number_of_tags()) = 1],
425node[name][eval(number_of_tags()) = 1],
426way[name][eval(number_of_tags()) = 1],
427node[ref][eval(number_of_tags()) = 1],
428way[ref][eval(number_of_tags()) = 1],
429node[surface][eval(number_of_tags()) = 1],
430way[surface][eval(number_of_tags()) = 1] {
[8054]431 throwWarning: tr("incomplete object: only {0}", "{0.key}");
[17050]432 set only_one_tag;
[11146]433 group: tr("missing tag");
[8054]434}
[13086]435/* only {0.key} and {1.key} */
[17957]436node[name][area][eval(number_of_tags()) = 2],
437way[name][area][eval(number_of_tags()) = 2],
438node[name][ref][eval(number_of_tags()) = 2],
439way[name][ref][eval(number_of_tags()) = 2] {
[8054]440 throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.key}");
[11146]441 group: tr("missing tag");
[8054]442}
[13086]443/* only {0.tag}, #15269 */
[17957]444node[tourism=attraction][eval(number_of_tags()) = 1],
445way[tourism=attraction][eval(number_of_tags()) = 1] {
[13086]446 throwWarning: tr("incomplete object: only {0}", "{0.tag}");
447 group: tr("missing tag");
448}
449/* only {0.key} and {1.tag} */
[17957]450node[name][tourism=attraction][eval(number_of_tags()) = 2],
451way[name][tourism=attraction][eval(number_of_tags()) = 2] {
[13086]452 throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.tag}");
453 group: tr("missing tag");
454}
[8054]455
[11548]456/* #9811, #11491, #12865, #14310 */
[17448]457*[place][place!=farm][place!=plot][/^(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)$/],
[11548]458/* addr:postcode is used together with place in some countries */
[8043]459*[boundary][/^addr:/],
[8730]460*[highway][/^addr:/][highway!=services][highway!=rest_area][!"addr:postcode"] {
[16255]461 throwWarning: tr("{0} together with {1}", "{0.key}", "addr:*");
[11146]462 group: tr("suspicious tag combination");
[11548]463 assertMatch: "node place=foo addr:housenumber=5";
464 assertMatch: "node place=foo addr:housenumber=5 addr:postcode=12345";
465 assertNoMatch: "node place=foo addr:postcode=12345";
[8043]466}
[18397]467*[postal_code]["addr:postcode"][!highway][postal_code=*"addr:postcode"] {
468 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
[11146]469 group: tr("suspicious tag combination");
[8730]470}
[18397]471*[postal_code]["addr:postcode"][!highway][postal_code!=*"addr:postcode"] {
472 throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}");
[11146]473 group: tr("suspicious tag combination");
[8730]474}
[18397]475way[postal_code]["addr:postcode"][highway][postal_code=*"addr:postcode"] {
476 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
[11146]477 group: tr("suspicious tag combination");
[8730]478 fixRemove: "addr:postcode";
479}
[18397]480way[postal_code]["addr:postcode"][highway][postal_code!=*"addr:postcode"] {
481 throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}");
[11146]482 group: tr("suspicious tag combination");
[8730]483}
[18397]484way[highway]["addr:postcode"][highway!=services][highway!=rest_area][!postal_code] {
485 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
[8730]486 suggestAlternative: "postal_code";
[11146]487 group: tr("suspicious tag combination");
[8730]488 fixChangeKey: "addr:postcode=>postal_code";
489}
[8043]490
[10350]491/* #9195 */
[11305]492way[highway=footway][cycleway=lane] {
[8042]493 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[8046]494 suggestAlternative: "highway=path + foot=designated + bicycle=designated + segregated=yes";
[11146]495 group: tr("suspicious tag combination");
[8042]496}
497
[17790]498/* {0} on suspicious object, #17255, #19650, #19572, #17253, #19821, #15667, #19930, #20435, #20471, #18815 */
[17481]499way[oneway ][!highway][!area:highway][!railway][!aerialway][attraction!=summer_toboggan][aeroway!~/^(runway|taxiway)$/][leisure!=track][waterway !~ /^(canal|fairway|lock|river|tidal_channel)$/],
[17050]500node[lanes ][!barrier][!ford][highway!=mini_roundabout][!junction][leisure!~/^(bowling_alley|slipway|swimming_pool|track)$/][!traffic_calming]!.only_one_tag,
[17481]501way[lanes ][!barrier][!ford][!highway ][!area:highway][!junction][leisure!~/^(bowling_alley|slipway|swimming_pool|track)$/][!traffic_calming]!.only_one_tag,
[18659]502*[tunnel ][!highway][!area:highway][!railway][!waterway][!piste:type][type!=tunnel][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=tunnel][power!=cable]!.TunnelCulvertWithoutWaterway,
[17790]503*[bridge ][!highway][!area:highway][!railway][!waterway][!piste:type][type!=bridge][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=bridge][building!=bridge],
[18522]504*[psv ][!highway][!area:highway][!railway][!waterway][barrier !~ /^(bollard|bump_gate|bus_trap|cattle_grid|chain|coupure|entrance|gate|height_restrictor|jersey_barrier|kerb|lift_gate|rope|sally_port|sliding_beam|sliding_gate|spikes|swing_gate|toll_booth|yes)$/][amenity !~ /^parking.*/],
[17481]505*[width ][!highway][!area:highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone][leisure!=track],
506*[maxspeed ][!highway][!area:highway][!railway][traffic_sign !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:forward !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:backward !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type != enforcement][waterway !~ /^(canal|fairway|lock|river|tidal_channel)$/][!traffic_calming][aerialway!=zip_line],
507way[incline][!highway][!area:highway][!railway][aeroway!~/^(runway|taxiway)$/][attraction!=summer_toboggan][leisure!=slipway] {
[6548]508 throwWarning: tr("{0} on suspicious object", "{0.key}");
[11146]509 group: tr("suspicious tag combination");
[6548]510}
511
[17209]512/* #15667, #19930 */
513way[waterway][oneway][waterway =~ /^(canal|fairway|lock|river|tidal_channel)$/] {
514 throwOther: tr("{0} together with {1}. The flow direction is defined by the way direction. Use {1} on {0} only in the rare case of a access restriction.", "{0.key}", "{1.key}");
515 group: tr("suspicious tag combination");
516}
517
[18397]518*[amenity][!name][amenity =~ /^(restaurant|cafe|fast_food|pub|place_of_worship|school|university|hospital|library|theatre|courthouse|bank|cinema|pharmacy|fuel)$/][noname!=yes] {
519 throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
[11146]520 group: tr("missing tag");
[6548]521 assertMatch: "node amenity=restaurant";
[7932]522 assertNoMatch: "node amenity=restaurant noname=yes";
[6548]523 assertNoMatch: "node amenity=restaurant name=Foobar";
524}
525
[13645]526/* #10193, #16157 */
[6550]527way[highway][barrier],
[8559]528*[highway][waterway][waterway!=dam][waterway!=weir],
[11429]529way[highway][natural][natural!=ridge],
[14275]530*[landuse][building][landuse!=retail] {
[11146]531 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
532 group: tr("suspicious tag combination");
[13645]533 assertNoMatch: "node highway=street_lamp natural=birds_nest";
[6548]534}
535
[10350]536/* #6932 */
[10798]537*[natural=water][leisure=swimming_pool] {
[6548]538 throwWarning: tr("natural water used for swimming pool");
[11146]539 group: tr("suspicious tag combination");
[7274]540 fixRemove: "natural";
[6548]541}
[6860]542
[19035]543/* #9593, #11183, #12418, #12761, #17254, #19311,#23604 */
544*[sport][sport!=skiing][!building][!"building:part"][!club][tourism != hotel][highway !~ /^(pedestrian|raceway)$/][!leisure][natural !~ /^(beach|bare_rock|cliff|peak|water)$/][amenity !~ /^(bar|dojo|pub|restaurant|swimming_pool)$/][landuse !~ /^(recreation_ground|piste|farm|farmland)$/][barrier !~ /^(wall|retaining_wall)$/][!"piste:type"][shop!=sports][attraction!=summer_toboggan] {
[6860]545 throwWarning: tr("sport without physical feature");
[11146]546 group: tr("missing tag");
[6860]547 assertMatch: "node sport=tennis";
548 assertNoMatch: "node sport=tennis leisure=pitch";
549 assertNoMatch: "node sport=beachvolleyball natural=beach";
[11159]550 assertNoMatch: "node sport=skiing"; /* skiing has deprecated warning */
[6860]551 assertNoMatch: "node sport=swimming tourism=hotel";
552 assertNoMatch: "node sport=10pin amenity=restaurant";
[19035]553 assertNoMatch: "node sport=boxing building:part=yes";
[7243]554}
555
[13972]556/* {0.key} without {1.key} or {2.key} see #10140 */
557*[building:levels][!building][!building:part],
[19165]558way[usage][!railway][!waterway][route!=railway][man_made!=pipeline][!aerialway] {
[7243]559 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.key}");
[11146]560 group: tr("missing tag");
[7243]561}
[7488]562
[18447]563/* any other *_name tag (with some exceptions) but not a name , see #10837 #11297 #11539 #16437 #17026 #22033 */
564*[/_name$/][!name][!old_name][!loc_name][!reg_name][!uic_name][!artist_name][!lock_name][!"osak:municipality_name"][!"osak:street_name"][NHD:subbasin_name !~ /^(Des Moines Headwaters|Upper Des Moines|East Fork Des Moines)$/][noname!=yes] {
[7818]565 throwWarning: tr("alternative name without {0}", "{1.key}");
[11146]566 group: tr("missing tag");
[18450]567 assertMatch: "way alt_name=Foo";
568 assertNoMatch: "way alt_name=Foo name=Bar";
[7818]569}
570
[16829]571/* #19604 */
572way[name][alt_name][name=*alt_name] {
573 throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
574 group: tr("suspicious tag combination");
575 fixRemove: "alt_name";
576}
577
[10350]578/* #10837 */
[9386]579way[destination][!oneway?][junction!=roundabout][highway] {
[7818]580 throwWarning: tr("incomplete usage of {0} on a way without {1}", "{0.key}", "{1.key}");
581 suggestAlternative: "destination:forward";
582 suggestAlternative: "destination:backward";
[8700]583}
584
[16501]585/* #11389, #19010 */
[17024]586way[maxspeed:forward][maxspeed:backward][!maxspeed]["maxspeed:forward"=*"maxspeed:backward"] {
[8700]587 throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
588 suggestAlternative: "maxspeed";
[11146]589 group: tr("suspicious tag combination");
[8700]590 fixChangeKey: "maxspeed:forward=>maxspeed";
591 fixRemove: "maxspeed:backward";
592}
[17024]593way[maxspeed:forward][maxspeed:backward][maxspeed]["maxspeed:forward"=*maxspeed]["maxspeed:backward"=*maxspeed] {
[8700]594 throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
595 set AllSameMaxspeed;
596 suggestAlternative: "maxspeed";
[11146]597 group: tr("suspicious tag combination");
[8700]598 fixRemove: "maxspeed:forward";
599 fixRemove: "maxspeed:backward";
600}
[17024]601way[cycleway:left][cycleway:right][!cycleway]["cycleway:left"=*"cycleway:right"] {
[16501]602 throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
603 suggestAlternative: "cycleway";
604 group: tr("suspicious tag combination");
605 fixChangeKey: "cycleway:left=>cycleway";
606 fixRemove: "cycleway:right";
607}
[17024]608way[cycleway:left][cycleway:right][cycleway]["cycleway:left"=*cycleway]["cycleway:right"=*cycleway] {
[16501]609 throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
610 set AllSameCycleway;
611 suggestAlternative: "cycleway";
612 group: tr("suspicious tag combination");
613 fixRemove: "cycleway:left";
614 fixRemove: "cycleway:right";
615}
[17024]616way[sidewalk:left][sidewalk:right][!sidewalk]["sidewalk:left"=*"sidewalk:right"] {
[16501]617 throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
618 suggestAlternative: "sidewalk";
619 group: tr("suspicious tag combination");
620 fixChangeKey: "sidewalk:left=>sidewalk";
621 fixRemove: "sidewalk:right";
622}
[17024]623way[sidewalk:left][sidewalk:right][sidewalk]["sidewalk:left"=*sidewalk]["sidewalk:right"=*sidewalk] {
[16501]624 throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
625 set AllSameSidewalk;
626 suggestAlternative: "sidewalk";
627 group: tr("suspicious tag combination");
628 fixRemove: "sidewalk:left";
629 fixRemove: "sidewalk:right";
630}
631way["maxspeed:forward"]["maxspeed:backward"][maxspeed]!.AllSameMaxspeed,
632way["cycleway:left"]["cycleway:right"][cycleway]!.AllSameCycleway,
633way["sidewalk:left"]["sidewalk:right"][sidewalk]!.AllSameSidewalk {
[8700]634 throwWarning: tr("{0} and {1} together with {2} and conflicting values", "{0.key}", "{1.key}", "{2.key}");
[11146]635 group: tr("suspicious tag combination");
[8700]636}
637way["maxspeed:forward"][maxspeed][!"maxspeed:backward"],
[16501]638way["maxspeed:backward"][maxspeed][!"maxspeed:forward"],
639way["cycleway:left"][cycleway][!"cycleway:right"],
640way["cycleway:right"][cycleway][!"cycleway:left"],
641way["sidewalk:left"][sidewalk][!"sidewalk:right"],
642way["sidewalk:right"][sidewalk][!"sidewalk:left"] {
[8700]643 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
[11146]644 group: tr("suspicious tag combination");
[8754]645}
646
[10350]647/* #11837 */
[18397]648way[bridge][layer][layer<0][bridge!=no][location!=underground][indoor!=yes][!tunnel],
649way[tunnel][layer][layer>0][tunnel!=no][location!=overground][indoor!=yes][!bridge] {
650 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[11146]651 group: tr("suspicious tag combination");
[10350]652}
653
654/* #12942 */
655relation[oneway][type!=route] {
656 throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}");
[10388]657}
658
659/* #9182 */
[10419]660way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) > 400] {
661 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}");
[11146]662 group: tr("suspicious tag combination");
[10388]663}
[10419]664way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) <= 400] {
665 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}");
[11146]666 group: tr("suspicious tag combination");
[10537]667}
668
[18397]669/* {0.key} without {1.tag} see #13138, #14468 */
670way[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir]!:closed, /* water=intermittent is deprecated and has an own warning */
671area[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir]:closed {
672 throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
[11146]673 group: tr("missing tag");
[10538]674}
[10995]675
[11047]676/* #13680 */
677area[golf=bunker][natural=beach] {
678 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
679 suggestAlternative: "natural=sand";
680 suggestAlternative: "surface=sand";
[11146]681 group: tr("suspicious tag combination");
[11080]682}
683
684/* #13705 */
685relation[type=multipolygon][building] > way {
686 set part_of_building_MP;
687}
[17448]688way["addr:housenumber"][!building][!"building:part"][!"demolished:building"][!note][!amenity][!leisure][!landuse][!man_made][!tourism][!barrier][place!=plot]!.part_of_building_MP {
[19479]689 /* do not exclude shop because a lot of real missing bulding tag cases have a shop tag. */
[11146]690 throwOther: tr("possibly missing {0} tag", "{1.key}");
691 group: tr("missing tag");
[11371]692}
693
[16769]694/* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
[16860]695way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/] {
696 set MotorwayTrunk;
697}
698way.MotorwayTrunk[lanes][turn:lanes ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
699way.MotorwayTrunk[lanes][change:lanes ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
700way.MotorwayTrunk[lanes][maxspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
701way.MotorwayTrunk[lanes][minspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
702way.MotorwayTrunk[lanes][destination:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
703way.MotorwayTrunk[lanes][destination:ref:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
704way.MotorwayTrunk[lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
[16769]705 throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}");
706 group: tr("suspicious tag combination");
707}
708
[15393]709/* #14125, #14323, #18185 */
[17759]710way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][oneway!=reversible][highway!=motorway][junction!=roundabout][lanes>2][mod(tag(lanes),2)=1] {
[11406]711 throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}");
[11371]712 group: tr("missing tag");
713 assertNoMatch: "way highway=primary lanes=2";
714 assertNoMatch: "way highway=primary lanes=3 lanes:backward=2";
715 assertNoMatch: "way highway=primary lanes=3 oneway=-1";
[11406]716 assertNoMatch: "way highway=primary lanes=4";
[11371]717 assertMatch: "way highway=primary lanes=3";
[14593]718}
719
[16860]720/* #10932, #19609 */
[18446]721way[/^.*:lanes$/][!lanes][highway][!source:lanes],
[18397]722way[/^.*:lanes:(forward|backward|both_ways)$/][!lanes][highway],
723way[/^.*:lanes:both_ways$/][!lanes:both_ways][highway] {
724 throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
[16769]725 group: tr("missing tag");
726 assertMatch: "way highway=primary turn:lanes=left|right";
[16860]727 assertMatch: "way highway=primary turn:lanes:forward=left|right";
[16769]728 assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2";
[16860]729}
[18397]730way[/^.*:lanes:forward$/][!lanes:forward][!lanes:backward][highway][mod(tag(lanes),2)=0],
731way[/^.*:lanes:backward$/][!lanes:backward][!lanes:forward][highway][mod(tag(lanes),2)=0] {
732 throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
[16860]733 group: tr("missing tag");
734 assertMatch: "way highway=primary turn:lanes:forward=left|right lanes=2";
[16769]735 assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes:forward=2";
[16860]736 assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes=3";
[16769]737}
738
[14593]739/* #15774 */
740node[emergency=fire_hydrant][fire_hydrant:count][fire_hydrant:count!=1] {
741 throwOther: tr("{0} together with {1}. Tag each hydrant separately.", "{0.tag}", "{1.tag}");
[14798]742}
[14830]743
744/* #12502 */
745node[leisure=park][natural=tree] {
746 throwWarning: tr("{0} together with {1} on a node. Remove {0}.", "{0.tag}", "{1.tag}");
747 group: tr("suspicious tag combination");
748 fixRemove: "leisure";
[14831]749}
750
751/* #17305 */
752area[boundary=administrative][landuse=residential] {
753 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
754 group: tr("suspicious tag combination");
755}
756
757/* #17391 */
[19140]758way[highway=pedestrian][width][siunit_length(tag(width))<3] {
[14831]759 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
760 suggestAlternative: "highway=footway";
761 group: tr("suspicious tag combination");
762 fixAdd: "highway=footway";
763 assertMatch: "way highway=pedestrian width=0.8";
764 assertMatch: "way highway=pedestrian width=1";
[14910]765 assertNoMatch: "way highway=pedestrian width=3";
[14831]766 assertNoMatch: "way highway=pedestrian width=5.5";
[15094]767}
768
769/* see #17623 */
[18112]770way:areaStyle[highway][highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service$|living_street|pedestrian|track|path|footway|cycleway|busway|bus_guideway|bridleway/][area!=yes] {
[15094]771 throwOther: tr("A linear object {0} without {1} has a tag indicating that it is an area.", "{1.tag}", "{3.tag}");
772 group: tr("suspicious tag combination");
[15169]773}
774
775/* #17804 */
776area[cemetery=sector][landuse=cemetery] {
777 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
778 group: tr("suspicious tag combination");
[15265]779}
780
781/* #17967 */
782*[highway=cycleway][cycleway=track] {
783 throwWarning: tr("{0} together with {1}. Remove {1}.", "{0.tag}", "{1.tag}");
784 group: tr("suspicious tag combination");
785 fixRemove: "cycleway";
[15268]786}
787
[17457]788/* #17973, #18183, #18331, #20318 */
789way[highway=path ][!segregated][foot=designated][bicycle=designated],
790way[highway=footway ][!segregated][bicycle=designated],
791way[highway=cycleway][!segregated][foot=designated] {
792 throwWarning: tr("Combined foot- and cycleway without {0}.", "{1.key}");
[15268]793 group: tr("missing tag");
[15311]794}
795
796/* #17989 */
797node[emergency_ward_entrance][emergency!=emergency_ward_entrance] {
798 throwWarning: tr("{0} without {1}", "{0.tag}", "{1.tag}");
799 group: tr("missing tag");
800 fixAdd: "emergency=emergency_ward_entrance";
[15414]801}
802
[18103]803/* missing or conflicting construction, see #17607 */
804/* {0.key} without {1.key} and {2.key} */
805*[construction:building][!building][!construction],
806*[construction:highway][!highway][!construction],
807*[construction:railway][!railway][!construction],
808*[construction:landuse][!landuse][!construction] {
809 throwWarning: tr("{0} without {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
810 group: tr("missing tag");
811 fixAdd: "{1.key}=construction";
812 fixAdd: "construction={0.value}";
813 assertMatch: "way construction:building=house";
814 assertNoMatch: "way construction:building=house building=house ";
815 assertNoMatch: "way construction:building=house construction=house";
816}
817/* {0.key} and {1.key} without {2.key} */
818*[building=construction]["construction:building"][!construction],
819*[highway=construction]["construction:highway"][!construction],
820*[railway=construction]["construction:railway"][!construction],
821*[landuse=construction]["construction:landuse"][!construction] {
822 throwWarning: tr("{0} together with {1} but without {2}", "{0.key}", "{1.key}", "{2.key}");
823 group: tr("missing tag");
824 fixAdd: "construction={1.value}";
825 assertMatch: "way construction:building=house building=construction";
826 assertNoMatch: "way construction:building=house building=house ";
827 assertNoMatch: "way construction:building=house construction=house";
828}
829/* {0.key} and {1.key} without {2.key} */
830*[building]["construction:building"][!construction][building!=construction],
831*[highway]["construction:highway"][!construction][highway!=construction],
832*[railway]["construction:railway"][!construction][railway!=construction],
833*[landuse]["construction:landuse"][!construction][landuse!=construction] {
834 throwWarning: tr("{0} together with {1} and conflicting values plus no {2}", "{0.key}", "{1.key}", "{2.key}");
835 group: tr("suspicious tag combination");
836 assertMatch: "way construction:building=house building=office";
837 assertNoMatch: "way construction:building=house building=construction";
838 assertNoMatch: "way construction:building=house construction=house";
839}
840
841*["construction:building"][construction][construction:building != *construction],
842*["construction:highway"][construction][construction:highway != *construction],
843*["construction:railway"][construction][construction:railway != *construction],
844*["construction:landuse"][construction][construction:landuse != *construction] {
845 throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}");
846 group: tr("suspicious tag combination");
847 assertMatch: "way construction:building=house construction=office";
848 assertNoMatch: "way construction:building=house construction=house";
849}
850
[18397]851/* #18203, #20960 */
852way[highway][construction][construction!~/^(yes|minor|no)$/][highway!=construction],
853way[railway][construction][construction!~/^(yes|minor|no)$/][railway!=construction],
854area[building][construction][construction!~/^(yes|minor|no)$/][building!=construction],
855area[landuse][construction][construction!~/^(yes|minor|no)$/][landuse!=construction] {
856 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
[15414]857 group: tr("suspicious tag combination");
[15648]858}
859
[18546]860/* #18374, #22295 */
[15648]861*[amenity=recycling][collection_times="24/7"][!opening_hours],
862*[amenity=recycling][collection_times ][!opening_hours][collection_times=~/[a-z]-[A-Z].*[0-9]-[0-9]/] {
863 throwWarning: tr("{0} together with {1}. Probably {2} is meant.", "{1.key}", "{0.tag}", "{2.key}");
864 group: tr("suspicious tag combination");
865 fixChangeKey: "collection_times => opening_hours";
[15765]866 assertMatch: "node amenity=recycling collection_times=\"Mo-Fr 06:00-20:00\"";
867 assertNoMatch: "node amenity=recycling collection_times=\"Mo-Fr 15:00\"";
868 assertNoMatch: "node amenity=recycling collection_times=\"Mo 08:00-11:00\"";
869 assertNoMatch: "node amenity=recycling collection_times=\"Sa[2,4] 8:00-11:00\"";
[15648]870}
[16254]871
[16256]872/* #19018 */
873way[highway][crossing][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|service|living_street)$/] {
874 throwWarning: tr("{0} together with {1}. Should be used on a minor highway type or a node", "{1.key}", "{0.tag}");
875 group: tr("suspicious tag combination");
876 fixRemove: "crossing";
877 assertMatch: "way highway=trunk crossing=unmarked";
878 assertNoMatch: "way highway=construction construction=footway crossing=unmarked";
879}
880
[16254]881/* #19066 */
882*[amenity=recycling][!/^recycling:/][recycling_type!=centre] {
883 throwWarning: tr("{0} without {1}", "{0.tag}", "recycling:*");
884 group: tr("missing tag");
[16255]885}
886*[source:addr][!/^addr:/] {
887 throwWarning: tr("{0} without {1}", "{0.key}", "addr:*");
888 group: tr("missing tag");
[16258]889 assertMatch: "node source:addr=postman";
890 assertNoMatch: "node source:addr=postman addr:housenumber=42";
[16255]891}
892*[source:maxspeed][!/^maxspeed:?/] {
893 throwWarning: tr("{0} without {1} or {2}", "{0.key}", "maxspeed", "maxspeed:*");
894 group: tr("missing tag");
[16705]895}
896
897/* #16898, tower vs. communications_tower, wiki suggests 100m as rough guideline, so we warn for < 75m */
[19129]898*[man_made=communications_tower][height][siunit_length(tag(height)) < 75] {
[16705]899 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
900 suggestAlternative: "man_made=tower + tower:type=communication + height";
901 group: tr("suspicious tag combination");
902 assertMatch: "node man_made=communications_tower height=58";
903 assertMatch: "node man_made=communications_tower height=\"74 m\"";
904 assertMatch: "node man_made=communications_tower height=0.8";
905 assertMatch: "node man_made=communications_tower height=245'";
906 assertMatch: "node man_made=communications_tower height=\"224.22 ft\"";
907 assertMatch: "node man_made=communications_tower height=231'10.22\"";
908 assertNoMatch: "node man_made=communications_tower height=\"75 m\"";
909 assertNoMatch: "node man_made=communications_tower height=75.72";
910 assertNoMatch: "node man_made=communications_tower height=\"328.22 ft\"";
911 assertNoMatch: "node man_made=communications_tower height=4358'8\"";
912 assertNoMatch: "node height=4358'";
[16769]913}
[16775]914
915/* #17296, If the value of fixme is only an osm key, it is often a leftover from a time when the object didn't have this key. The fixme was forgotten to remove when the key was added. Or the value of fixme should be described better what exactly needs to be fixed. */
[17038]916*[fixme][count(split(" ", tag("fixme"))) == 1][has_tag_key(tag("fixme"))],
917*[FIXME][count(split(" ", tag("FIXME"))) == 1][has_tag_key(tag("FIXME"))] {
[16775]918 throwWarning: tr("{0} together with {1}. Is the fixme fixed?", "{0.tag}", "{0.value}");
919 group: tr("suspicious tag combination");
920 assertMatch: "way name=\"Florist Gump\" fixme=name";
[16777]921 assertMatch: "way name=\"Florist Gump\" FIXME=name";
[16775]922 assertNoMatch: "way fixme=name";
923 assertNoMatch: "way name=\"Florist Gump\"";
924 assertNoMatch: "way name=\"Florist Gump\" fixme=\"the name might have changed\"";
[16778]925}
926
927/* #19094 */
928way[highway][placement=transition][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition],
929way[highway][!placement][/^placement:.*$/][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition] {
930 throwWarning: tr("Use {0} only as value of {1}", "transition", "placement");
931 set PlacementTransitionWarning;
932 fixAdd: "placement=transition";
933 fixRemove: "placement:forward";
934 fixRemove: "placement:backward";
935 fixRemove: "placement:both_ways";
936 assertMatch: "way highway=primary placement=transition placement:both_ways=transition";
937 assertMatch: "way highway=primary placement:backward=transition placement:forward=transition";
938 assertNoMatch: "way highway=primary placement:backward=middle_of:1 placement:forward=transition";
939 assertNoMatch: "way highway=primary placement=middle_of:1 placement:backward=transition placement:forward=transition";
940}
[18397]941way[placement][/^placement:.*$/][highway]!.PlacementTransitionWarning,
942way["placement:forward"]["placement:backward"][highway]!.PlacementTransitionWarning,
943way["placement:forward"]["placement:both_ways"][highway]!.PlacementTransitionWarning,
944way["placement:backward"]["placement:both_ways"][highway]!.PlacementTransitionWarning {
945 throwError: tr("{0} together with {1}", "{0.key}", "{1.key}");
[16778]946 group: tr("suspicious tag combination");
947 assertMatch: "way highway=primary placement=left_of:2 placement:forward=right_of:1";
948 assertNoMatch: "way highway=primary placement:forward=right_of:1";
949 assertNoMatch: "way highway=primary placement:forward=transition placement:both_ways=transition";
[16993]950}
951
952/* #19742 */
953node:righthandtraffic[highway=mini_roundabout][direction=clockwise] {
954 throwWarning: tr("{0} together with {1} at right-hand traffic", "{1.tag}", "{2.tag}");
955 group: tr("suspicious tag combination");
956}
957node!:righthandtraffic[highway=mini_roundabout][direction=anticlockwise] {
958 throwWarning: tr("{0} together with {1} at left-hand traffic", "{1.tag}", "{2.tag}");
959 group: tr("suspicious tag combination");
[17051]960}
961
962/* #19603 */
963way[footway][highway][footway=sidewalk ][highway!~/^(path|footway|cycleway|construction|proposed)$/] {
964 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
965 group: tr("suspicious tag combination");
966 suggestAlternative: "sidewalk=left";
967 suggestAlternative: "sidewalk=right";
968 suggestAlternative: "sidewalk=both";
969 suggestAlternative: "sidewalk=separate";
970}
971way[footway][highway][footway!=sidewalk][highway!~/^(path|footway|cycleway|construction|proposed)$/] {
972 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
973 group: tr("suspicious tag combination");
974}
975way[footway][!highway][!/:highway$/],
976way[cycleway][!highway][!/:highway$/] {
977 throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
978 group: tr("missing tag");
979 assertNoMatch: "way footway=sidewalk abandoned:highway=unclassified";
[17105]980}
981
982/* #17498 */
[17122]983way[bicycle][/^cycleway(:|$)/][!/^bicycle:/][bicycle=~/^(no|use_sidepath)$/][/^cycleway(:|$)/!~/^(no|none|separate)$/] {
[17105]984 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
985 group: tr("suspicious tag combination");
986 assertMatch: "way bicycle=no cycleway=track";
987 assertMatch: "way bicycle=use_sidepath cycleway=lane";
988 assertMatch: "way bicycle=use_sidepath cycleway:left=lane";
989 assertNoMatch: "way bicycle=use_sidepath cycleway=no";
990 assertNoMatch: "way bicycle=use_sidepath bicycle:backward=yes cycleway:left=lane"; /* instead of :backward, could also be :forward or :conditional */
991 assertNoMatch: "way bicycle=no cycleway:right=no";
992 assertNoMatch: "way bicycle=use_sidepath cycleway:left=none";
993 assertNoMatch: "way highway=cycleway cycleway=separate";
994 assertNoMatch: "way highway=residential bicycle=use_sidepath";
[17247]995}
996
997/* #19980 */
[17253]998way[highway=living_street][maxspeed][maxspeed=~/mph/][get(split(" ", tag(maxspeed)), 0) > 15],
[19440]999way[highway=living_street][maxspeed][maxspeed!~/mph/][get(split(" ", tag(maxspeed)), 0) > 20][outside("AT,CL,DK,IL,UZ")],
1000way[highway=living_street][maxspeed][maxspeed!~/mph/][get(split(" ", tag(maxspeed)), 0) > 30][inside("AT,CL,DK,IL,UZ")] { /*Austria, Chile, Denmark, Israel, Uzbekistan*/
[17247]1001 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
1002 group: tr("suspicious tag combination");
1003 assertNoMatch: "way highway=living_street";
1004 assertNoMatch: "way highway=living_street maxspeed=20";
[17253]1005 assertNoMatch: "way highway=living_street maxspeed=\"15 mph\"";
[17247]1006 assertNoMatch: "way highway=living_street maxspeed=walk";
[19434]1007 assertMatch: "way highway=living_street maxspeed=50";
[17253]1008 assertMatch: "way highway=living_street maxspeed=\"20 mph\"";
[17457]1009}
[18047]1010
1011/* piste subtags, see #17606 */
1012way[piste:type=nordic][!piste:grooming] {
1013 throwWarning: tr("No grooming defined for {0} skiing, add {1}", "nordic", "piste:grooming=");
1014 group: tr("missing tag");
1015 assertMatch: "way piste:type=nordic";
1016 assertNoMatch: "way piste:type=nordic piste:grooming=classic";
1017}
1018
1019way[piste:type =~ /^downhill|nordic|skitour$/][!piste:difficulty][count(parent_tags("piste:difficulty")) == 0] {
1020 set missing_parent_piste_difficulty;
1021}
1022way.missing_parent_piste_difficulty:new,
1023way.missing_parent_piste_difficulty:in-downloaded-area!:new {
1024 throwWarning: tr("No difficulty defined for skiing, add {0}", "piste:difficulty=");
1025 group: tr("missing tag");
1026 set missing_piste_difficulty;
1027 assertNoMatch: "way piste:type=nordic piste:difficulty=easy";
1028}
1029relation[piste:type =~ /^downhill|nordic|skitour$/][!piste:difficulty] >
1030 way[!piste:difficulty]!.missing_piste_difficulty {
1031 throwWarning: tr("No difficulty defined for skiing, add {0}", "piste:difficulty=");
1032 group: tr("missing tag");
1033 set missing_piste_difficulty_both;
1034 assertNoMatch: "way piste:type=nordic piste:difficulty=easy";
1035}
1036way[piste:type=nordic][!piste:difficulty]!.missing_piste_difficulty!.missing_piste_difficulty_both {
1037 throwOther: tr("No difficulty defined for skiing, add {0}", "piste:difficulty=");
1038 group: tr("missing tag");
1039 assertMatch: "way piste:type=nordic";
1040 assertNoMatch: "way piste:type=nordic piste:difficulty=easy";
1041}
1042
1043relation[piste:type =~ /^downhill|nordic|skitour$/][!piste:difficulty] {
1044 throwOther: tr("No difficulty defined for skiing, add {0}", "piste:difficulty=");
1045 group: tr("missing tag");
1046 assertMatch: "relation piste:type=nordic";
1047 assertNoMatch: "relation piste:type=nordic piste:difficulty=easy";
1048}
1049relation[piste:type=nordic][!piste:grooming]{
1050 throwOther: tr("No grooming defined for {0} skiing, add {1}", "nordic", "piste:grooming=");
1051 group: tr("missing tag");
1052 assertMatch: "relation piste:type=nordic";
1053 assertNoMatch: "relation piste:type=nordic piste:grooming=classic";
1054}
[18535]1055
[19590]1056/* #20421 */
1057*[substation][transformer=distribution] {
1058 throwWarning: tr("{0} together with {1}", "{1.tag}", "{0.key}");
1059 suggestAlternative: "transformer=main";
1060 group: tr("suspicious tag combination");
1061 fixAdd: "transformer=main"
1062}
1063
[18535]1064/* #21836 */
1065*[voltage:primary][voltage:secondary][transformer=generator][tag("voltage:secondary")<tag("voltage:primary")] {
1066 throwWarning: tr("{0} is lower than {1} on {2}.", "{1.key}", "{0.key}", "{2.tag}");
1067 group: tr("suspicious tag combination");
[18731]1068}
1069
1070/* #21286 */
[19140]1071area[/^(building|building:part)$/][height][min_height][siunit_length(tag(height)) <= siunit_length(tag(min_height))],
[18731]1072area[/^(building|building:part)$/][building:levels][building:min_level][tag("building:levels") <= tag("building:min_level")] {
1073 throwWarning: tr("{0} is lower or equal to {1} on {2}", "{1.key}", "{2.key}", "{0.key}");
1074 group: tr("suspicious tag combination");
1075}
[19257]1076
1077/* #23932 */
1078way[cycleway:right][cycleway:right!=lane][cycleway:right!=separate][/^cycleway(:right|:both|):buffer/],
1079way[cycleway:left][cycleway:left!=lane][cycleway:left!=separate][/^cycleway(:left|:both|):buffer/],
1080way[cycleway:both][cycleway:both!=lane][cycleway:both!=separate][/^cycleway(:right|:left|:both|):buffer/],
1081way[cycleway][cycleway!=lane][cycleway!=separate][/^cycleway(:right|:left|:both|):buffer/] {
1082 throwWarning: tr("{0} together with {1}", "{0.tag}", "{3.tag}");
1083 group: tr("suspicious tag combination");
1084 assertMatch: "way cycleway:left=shared_lane cycleway:buffer=no";
1085 assertMatch: "way cycleway:both=track cycleway:left:buffer=yes";
1086 assertMatch: "way cycleway=shared_busway cycleway:buffer=no";
1087 assertNoMatch: "way cycleway:right=lane cycleway:right:buffer=no";
1088 assertNoMatch: "way cycleway:right=separate cycleway:right:buffer=yes";
1089 assertNoMatch: "way cycleway:left=lane cycleway:left:buffer=yes";
1090 assertNoMatch: "way cycleway:both=lane cycleway:both:buffer=no";
1091 assertNoMatch: "way cycleway:both=lane cycleway:left:buffer=yes";
1092 assertNoMatch: "way cycleway:both=lane cycleway:buffer=no";
1093 assertNoMatch: "way cycleway=lane cycleway:buffer=yes";
1094 assertNoMatch: "way cycleway=lane cycleway:right:buffer=no";
1095 assertNoMatch: "way cycleway=lane cycleway:both:buffer=no";
1096}
1097
1098way[cycleway:right=separate][/^cycleway(:right|:both):./],
1099way[cycleway:left=separate][/^cycleway(:left|:both):./],
1100way[cycleway:both=separate][/^cycleway(:right|:left|:both):./],
1101way[cycleway=separate][/^cycleway(:right|:left|:both):./] {
1102 throwWarning: tr("{0} together with {1}. Remove {1}.", "{0.tag}", "{1.tag}");
1103 group: tr("suspicious tag combination");
1104 assertMatch: "way cycleway:right=separate cycleway:right:surface=asphalt";
1105 assertMatch: "way cycleway:right=separate cycleway:both:buffer=yes";
1106 assertMatch: "way cycleway:left=separate cycleway:left:surface=asphalt";
1107 assertMatch: "way cycleway:left=separate cycleway:both:buffer=yes";
1108 assertMatch: "way cycleway:both=separate cycleway:right:surface=asphalt";
1109 assertMatch: "way cycleway:both=separate cycleway:left:surface=asphalt";
1110 assertMatch: "way cycleway:both=separate cycleway:both:buffer=yes";
1111 assertMatch: "way cycleway=separate cycleway:right:surface=asphalt";
1112 assertMatch: "way cycleway=separate cycleway:left:surface=asphalt";
1113 assertMatch: "way cycleway=separate cycleway:both:buffer=yes";
1114 assertNoMatch: "way cycleway:right=separate cycleway:left:surface=asphalt";
1115 assertNoMatch: "way cycleway:left=separate cycleway:right:buffer=yes";
1116 assertNoMatch: "way cycleway:both=separate";
1117 assertNoMatch: "way cycleway=separate";
1118}
1119
1120way[/^cycleway:right:/][!cycleway:right][!cycleway:both][!cycleway],
1121way[/^cycleway:left:/][!cycleway:left][!cycleway:both][!cycleway],
1122way[/^cycleway:both:/][!cycleway:both][!cycleway][!cycleway:left][!cycleway:right],
1123way[/^cycleway(?!:right|:left|:both|:lanes):/][!cycleway][!cycleway:both][!cycleway:left][!cycleway:right][segregated!=yes] {
1124 throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
1125 group: tr("missing tag");
1126 suggestAlternative: "{0.tag} + {1.key}=*";
1127 assertMatch: "way cycleway:right=lane cycleway:left:buffer=yes";
1128 assertMatch: "way cycleway:right:buffer=yes";
1129 assertMatch: "way cycleway:right:surface=asphalt";
1130 assertMatch: "way cycleway:left=lane cycleway:right:buffer=no";
1131 assertMatch: "way cycleway:left:buffer=yes";
1132 assertMatch: "way cycleway:left:surface=asphalt";
1133 assertMatch: "way cycleway:both:buffer=yes";
1134 assertMatch: "way cycleway:both:surface=asphalt";
1135 assertMatch: "way cycleway:buffer=no";
1136 assertNoMatch: "way cycleway:right=lane cycleway:right:buffer=yes";
1137 assertNoMatch: "way cycleway:left=lane cycleway:left:buffer=yes";
1138 assertNoMatch: "way cycleway:both=lane cycleway:both:buffer=yes";
1139 assertNoMatch: "way cycleway=lane cycleway:buffer=yes";
1140 assertNoMatch: "way cycleway:left=lane cycleway:right=lane cycleway:both:buffer=yes";
1141 assertNoMatch: "way cycleway:left=lane cycleway:right=lane cycleway:buffer=no";
1142 assertNoMatch: "way cycleway=lane cycleway:surface=asphalt";
1143 assertNoMatch: "way cycleway:both=lane cycleway:both:surface=asphalt";
1144 assertNoMatch: "way highway=path segregated=yes cycleway:surface=needles footway:surface=paving_stones";
1145 assertNoMatch: "way highway=primary oneway=yes bicycle:lanes=no|designated|yes cycleway:lanes=|lane|no";
1146}
[19467]1147
1148/* Prevent redundancy between relation and members, see #24456, #24457 */
1149relation[power=circuit] > way[power=line][frequency],
1150relation[power=circuit] > way[power=minor_line][frequency],
1151relation[power=circuit] > way[power=cable][frequency] {
1152 throwWarning: tr("Frequency tag should be on the circuit relation only, not on the power segment");
1153 group: tr("redundant tagging");
1154}
1155relation[power=circuit] > relation[power=line_section][frequency] {
1156 throwWarning: tr("Frequency tag should be on the circuit relation only, not on the power section");
1157 group: tr("redundant tagging");
1158}
1159
1160/* Invalid topology with power circuit relation, see #24456 */
1161relation[power=circuit][topology][topology!~/^(linear|branched)$/] {
1162 throwError: tr("power=circuit relations should have a topology tag with value linear or branched");
1163 assertMatch: "relation type=power power=circuit topology=branch";
1164 assertNoMatch: "relation type=power power=circuit topology=branched";
[19468]1165}
[19475]1166
1167/* #21927 */
1168way[!cycleway][!cycleway:right][!cycleway:left][!cycleway:both][!cycleway:lanes] > node[cycleway=asl] {
1169 throwWarning: tr("{0} not on cycleway", "{0.tag}");
1170 group: tr("suspicious tag combination");
1171}
1172
1173way[/^oneway(:bicycle)?$/!~/^yes$/] > node[cycleway=asl][!direction],
1174way[!oneway][!oneway:bicycle] > node[cycleway=asl][!direction] {
1175 throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
1176 group: tr("missing tag");
1177 suggestAlternative: "{0.tag} + {1.key}=*";
1178}
[19591]1179
1180/* #24724 */
1181*[marker][voltage] {
1182 throwWarning: tr("{0} with {1}", "{0.tag}", "{1.key}");
1183 group: tr("suspicious tag combination");
1184 suggestAlternative: "indication:voltage=*";
1185 fixRemove: "voltage";
1186 fixAdd: "indication:voltage={1.value}"
1187}
1188*[marker][diameter] {
1189 throwWarning: tr("{0} with {1}", "{0.tag}", "{1.key}");
1190 group: tr("suspicious tag combination");
1191 suggestAlternative: "indication:diameter=*";
1192 fixRemove: "diameter";
1193 fixAdd: "indication:diameter={1.value}"
1194}
1195*[marker][pressure] {
1196 throwWarning: tr("{0} with {1}", "{0.tag}", "{1.key}");
1197 group: tr("suspicious tag combination");
1198 suggestAlternative: "indication:pressure=*";
1199 fixRemove: "pressure";
1200 fixAdd: "indication:pressure={1.value}"
1201}
1202*[marker][substance] {
1203 throwWarning: tr("{0} with {1}", "{0.tag}", "{1.key}");
1204 group: tr("suspicious tag combination");
1205 suggestAlternative: "indication:substance=*";
1206 fixRemove: "substance";
1207 fixAdd: "indication:substance={1.value}"
1208}
Note: See TracBrowser for help on using the repository browser.