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

Last change on this file since 6548 was 6548, checked in by simon04, 9 years ago

see #9414 - MapCSS-based tagchecker: migrate remaining tagchecks

All former tagchecker.cfg checks are now located in data/validator/*mapcss :-)

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