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