[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 |
|
---|
[7229] | 5 | /* {0.key} without {1.key} (warning level) */
|
---|
[6548] | 6 | way[junction ][!highway],
|
---|
| 7 | *[lanes ][!highway],
|
---|
| 8 | *[lcn ][!highway],
|
---|
| 9 | *[living_street ][!highway],
|
---|
| 10 | *[maintenance ][!highway],
|
---|
| 11 | *[median ][!highway],
|
---|
| 12 | *[motorroad ][!highway],
|
---|
| 13 | *[ntd_id ][!highway],
|
---|
| 14 | *[sac_scale ][!highway],
|
---|
| 15 | *[sidewalk ][!highway],
|
---|
| 16 | *[smoothness ][!highway],
|
---|
| 17 | *[step_count ][!highway],
|
---|
| 18 | *[tracktype ][!highway],
|
---|
| 19 | *[trail_visibility ][!highway],
|
---|
| 20 | *[trolley_wire ][!highway],
|
---|
| 21 | *[zip_left ][!highway],
|
---|
| 22 | *[zip_right ][!highway],
|
---|
[6812] | 23 | *[detail ][!railway][route!=railway],
|
---|
| 24 | *[eddy_current_brake ][!railway][route!=railway],
|
---|
| 25 | *[electrified ][!railway][route!=railway],
|
---|
| 26 | *[etcs ][!railway][route!=railway],
|
---|
| 27 | *[gauge ][!railway][route!=railway],
|
---|
| 28 | *[grade_of_track ][!railway][route!=railway],
|
---|
| 29 | *[kursbuchstrecke ][!railway][route!=railway],
|
---|
| 30 | *[lzb ][!railway][route!=railway],
|
---|
| 31 | *[old_railway_operator ][!railway][route!=railway],
|
---|
| 32 | *[operating_procedure ][!railway][route!=railway],
|
---|
| 33 | *[pzb ][!railway][route!=railway],
|
---|
| 34 | *[radio ][!railway][route!=railway],
|
---|
| 35 | *[structure_gauge ][!railway][route!=railway],
|
---|
| 36 | *[tilting_technology ][!railway][route!=railway],
|
---|
| 37 | *[track_class ][!railway][route!=railway],
|
---|
| 38 | *[tracks ][!railway][route!=railway],
|
---|
| 39 | *[traffic_mode ][!railway][route!=railway],
|
---|
| 40 | *[usage ][!railway][route!=railway],
|
---|
| 41 | *[workrules ][!railway][route!=railway],
|
---|
[6548] | 42 | *[stream ][!waterway],
|
---|
| 43 | *[length_unit ][!waterway],
|
---|
| 44 | *[llid ][!waterway],
|
---|
| 45 | *[canal ][!waterway],
|
---|
| 46 | *[have_riverbank ][!waterway],
|
---|
| 47 | *[border_type ][!boundary],
|
---|
| 48 | *[source:date ][!source],
|
---|
| 49 | *[source:name ][!name],
|
---|
| 50 | *[source:maxspeed:forward ][!maxspeed:forward],
|
---|
| 51 | *[source:maxspeed:backward ][!maxspeed:backward],
|
---|
| 52 | *[source:maxspeed:forward ][!source:maxspeed:backward],
|
---|
| 53 | *[source:maxspeed:backward ][!source:maxspeed:forward],
|
---|
| 54 | *[source:building ][!building],
|
---|
| 55 | *[source:ref ][!ref],
|
---|
| 56 | *[source:population ][!population],
|
---|
| 57 | *[source:postal_code ][!postal_code],
|
---|
| 58 | *[source:ele ][!ele],
|
---|
| 59 | *[source:ref:INSEE ][!ref:INSEE],
|
---|
| 60 | *[source:lit ][!lit],
|
---|
| 61 | *[source:hgv ][!hgv],
|
---|
| 62 | *[source:highway ][!highway],
|
---|
| 63 | *[source:maxaxleload ][!maxaxleload],
|
---|
| 64 | *[source:surface ][!surface],
|
---|
| 65 | *[source:bridge ][!bridge],
|
---|
| 66 | *[source:old_name ][!old_name],
|
---|
| 67 | *[source:bicycle ][!bicycle],
|
---|
| 68 | *[source:designation ][!designation],
|
---|
| 69 | *[source:height ][!height],
|
---|
| 70 | *[source:lanes ][!lanes],
|
---|
[6645] | 71 | *[source:postcode ][!addr:postcode],
|
---|
| 72 | *[source:housenumber ][!addr:housenumber],
|
---|
| 73 | *[source:addr:postcode ][!addr:postcode],
|
---|
| 74 | *[source:addr:housenumber ][!addr:housenumber],
|
---|
[6548] | 75 | *[source:addr ][!/^addr:/],
|
---|
| 76 | *[source:maxspeed ][!/^maxspeed:?/] {
|
---|
| 77 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
|
---|
| 78 | assertMatch: "way lanes=42";
|
---|
| 79 | assertNoMatch: "way lanes=42 highway=unclassified";
|
---|
| 80 | assertMatch: "node source:addr:postcode=postman";
|
---|
| 81 | assertMatch: "node source:addr=postman";
|
---|
| 82 | assertNoMatch: "node source:addr=postman addr:housenumber=42";
|
---|
| 83 | }
|
---|
| 84 |
|
---|
[7229] | 85 | /* {0.key} without {1.key} (info level) */
|
---|
| 86 | *[leaf_type ][!leaf_cycle],
|
---|
| 87 | *[leaf_cycle][!leaf_type] {
|
---|
| 88 | throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
|
---|
| 89 | }
|
---|
| 90 |
|
---|
[6548] | 91 | /* {0.key} without {1.tag} */
|
---|
| 92 | *[fence_type ][barrier!=fence],
|
---|
| 93 | *[recycling_type ][amenity!=recycling],
|
---|
| 94 | *[board_type ][information!=board],
|
---|
| 95 | *[shelter_type ][amenity!=shelter],
|
---|
| 96 | *[lamp_type ][highway!=street_lamp],
|
---|
| 97 | *[map_type ][information!=map],
|
---|
| 98 | *[site_type ][historic!=archaeological_site],
|
---|
| 99 | *[artwork_type ][tourism!=artwork],
|
---|
| 100 | *[castle_type ][historic!=castle],
|
---|
| 101 | *[reservoir_type ][landuse!=reservoir][water!=reservoir],
|
---|
| 102 | *[bunker_type ][military!=bunker] {
|
---|
| 103 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
|
---|
| 104 | }
|
---|
| 105 |
|
---|
| 106 | /* {0.key} without {1.key} or {2.key} */
|
---|
| 107 | *[incline ][!highway][!railway],
|
---|
| 108 | *[oneway ][!highway][!railway] {
|
---|
| 109 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | /* {0.key} without {1.key} or {2.tag} */
|
---|
[7286] | 113 | *[segregated ][!highway][railway!=crossing],
|
---|
[6758] | 114 | *[boat ][!waterway][natural!=water],
|
---|
| 115 | *[intermittent ][!waterway][natural!=water] {
|
---|
[6548] | 116 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
|
---|
| 117 | }
|
---|
| 118 |
|
---|
[6880] | 119 | /* {0.key} without {1.key}, {2.key} or {3.key} */
|
---|
| 120 | *[snowplowing ][!highway][!amenity][!leisure] {
|
---|
| 121 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
|
---|
| 122 | }
|
---|
| 123 |
|
---|
[7250] | 124 | /* {0.key} without {1.key}, {2.key} or {3.tag} */
|
---|
| 125 | *[toll ][!highway][!barrier][route!~/^(ferry|road)$/] {
|
---|
| 126 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.tag}");
|
---|
| 127 | }
|
---|
| 128 |
|
---|
[6548] | 129 | /* {0} on suspicious object */
|
---|
| 130 | *[tunnel ][!highway][!railway][!waterway][public_transport != platform][man_made != pipeline],
|
---|
| 131 | *[bridge ][!highway][!railway][!waterway][!piste:type][public_transport != platform][man_made !~ /^(bridge|pipeline)$/][building != bridge],
|
---|
| 132 | *[psv ][!highway][!railway][!waterway][amenity !~ /^parking.*/],
|
---|
| 133 | *[width ][!highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance],
|
---|
[7032] | 134 | *[maxspeed][!highway][!railway][traffic_sign !~ /^(.*;)?maxspeed(;.*)?$/][type != enforcement][waterway !~ /^(river|canal|lock)$/],
|
---|
[7284] | 135 | *[lit ][!highway][!railway][!piste:type][amenity !~ /^(parking|shelter)/][public_transport!=platform][advertising!=billboard][leisure!=pitch] {
|
---|
[6548] | 136 | throwWarning: tr("{0} on suspicious object", "{0.key}");
|
---|
| 137 | }
|
---|
| 138 |
|
---|
| 139 | node[amenity =~ /^(restaurant|cafe|fast_food)$/][!name] {
|
---|
| 140 | throwOther: tr("restaurant without name");
|
---|
| 141 | assertMatch: "node amenity=restaurant";
|
---|
| 142 | assertNoMatch: "node amenity=restaurant name=Foobar";
|
---|
| 143 | }
|
---|
| 144 |
|
---|
[6550] | 145 | way[highway][barrier],
|
---|
[6548] | 146 | *[highway][waterway][waterway!=dam],
|
---|
[7265] | 147 | way[highway][natural],
|
---|
[6548] | 148 | *[landuse][building] {
|
---|
| 149 | throwWarning: tr("{0} used with {1}", "{0.key}", "{1.key}");
|
---|
[7265] | 150 | assertNoMatch: "node highway=street_lamp natural=birds_nest note=josm#10193";
|
---|
[6548] | 151 | }
|
---|
| 152 |
|
---|
| 153 | *[natural=water][leisure=swimming_pool],
|
---|
| 154 | *[natural=water][amenity=swimming_pool] {
|
---|
| 155 | /* see #6932 */
|
---|
| 156 | throwWarning: tr("natural water used for swimming pool");
|
---|
[7274] | 157 | fixRemove: "natural";
|
---|
[6548] | 158 | }
|
---|
[6860] | 159 |
|
---|
| 160 | /* see ticket #9593 */
|
---|
[7264] | 161 | *[sport][tourism != hotel][highway != raceway][leisure !~ /^(sports_centre|stadium|track|pitch|golf_course|water_park|swimming_pool|recreation_ground)$/][natural !~ /^(beach|bare_rock)$/][amenity !~ /^(pub|restaurant|swimming_pool)$/][landuse !~ /^(recreation_ground|piste|farm|farmland)$/] {
|
---|
[6860] | 162 | throwWarning: tr("sport without physical feature");
|
---|
| 163 | assertMatch: "node sport=tennis";
|
---|
| 164 | assertNoMatch: "node sport=tennis leisure=pitch";
|
---|
| 165 | assertNoMatch: "node sport=beachvolleyball natural=beach";
|
---|
| 166 | assertNoMatch: "node sport=skiiing landuse=piste";
|
---|
| 167 | assertNoMatch: "node sport=swimming tourism=hotel";
|
---|
| 168 | assertNoMatch: "node sport=10pin amenity=restaurant";
|
---|
[7243] | 169 | }
|
---|
| 170 |
|
---|
| 171 | /* see #10140 */
|
---|
| 172 | *[building:levels][!building][!building:part] {
|
---|
| 173 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
| 174 | }
|
---|