source: josm/trunk/data/validator/unnecessary.mapcss@ 14904

Last change on this file since 14904 was 14904, checked in by Don-vip, 5 years ago

fix #9257 - detect highway=footway|pedestrian with foot=yes|designated (and highway=cycleway with bicycle=yes|designated)

  • Property svn:eol-style set to native
File size: 4.7 KB
Line 
1*[access][highway=proposed],
2*[motor_vehicle?][vehicle!=no][access!=no][bicycle_road!=yes][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|service|living_street)$/],
3*[bridge=no],
4*[building=no],
5*[elevation="0"],
6*[layer="0"] {
7 /* see #9365 - Useless tag layer=0 */
8 throwWarning: tr("{0} is unnecessary", "{0.tag}");
9 group: tr("unnecessary tag");
10 fixRemove: "{0.key}";
11 assertMatch: "way layer=0";
12 assertMatch: "way bridge=no";
13 assertMatch: "way highway=proposed access=no";
14}
15
16area:closed[amenity ][area?][!highway],
17area:closed[building][area?],
18area:closed[landuse ][area?][!highway],
19area:closed[leisure ][area?][!highway][leisure!=track][leisure!=slipway],
20area:closed[natural ][area?],
21area:closed[shop ][area?] {
22 throwWarning: tr("{0} is unnecessary for {1}", "{2.key}", "{1.key}");
23 group: tr("unnecessary tag");
24 fixRemove: "{2.key}";
25}
26
27/* #14256, #15664 */
28area:closed[highway=rest_area][area?],
29area:closed[highway=services][area?],
30area:closed[aeroway=aerodrome][area?],
31area:closed[aeroway=helipad][area?] {
32 throwWarning: tr("{0} is unnecessary for {1}", "{2.key}", "{1.tag}");
33 group: tr("unnecessary tag");
34 fixRemove: "{2.key}";
35}
36
37/* #9257, #17482 */
38way[foot =~ /^(yes|designated)$/][highway =~ /^(footway|pedestrian)$/],
39way[bicycle =~ /^(yes|designated)$/][highway=cycleway],
40*[building:ruian:type=2][building=farm_auxiliary],
41*[building:ruian:type=7][building=house],
42*[building:ruian:type=11][building=hotel],
43*[building:ruian:type=12][building=warehouse],
44*[building:ruian:type=13][building=barn],
45*[building:ruian:type=18][building=garage],
46*[building:ruian:type=21][building=greenhouse] {
47 throwWarning: tr("{0} is unnecessary for {1}", "{0.tag}", "{1.tag}");
48 group: tr("unnecessary tag");
49 fixRemove: "{0.key}";
50}
51
52*[emergency=permissive] {
53 /* see #9458 - emergency=permissive makes no sense */
54 throwWarning: tr("{0} makes no sense", "{0.tag");
55 fixAdd: "emergency=yes";
56 assertMatch: "way emergency=permissive";
57 assertNoMatch: "way emergency=designated";
58}
59
60/* see ticket #7639 -- Warn when a node has the same tags as its parent way. */
61way >:sameTags node:tagged {
62 throwWarning: tr("Nodes duplicating parent way tags");
63}
64
65/* #15477 */
66*[payment:cash][payment:coins][payment:notes] {
67 throwWarning: tr("{0} together with {1} and {2}. Remove {0}.", "{0.key}", "{1.key}", "{2.key}");
68 group: tr("unnecessary tag");
69 fixRemove: "payment:cash";
70}
71
72/* see #10346, #15667 */
73way[waterway][oneway?] {
74 throwWarning: tr("{0} is unnecessary for {1}", "{1.key}", "{0.key}");
75 group: tr("unnecessary tag");
76 fixRemove: "{1.key}";
77}
78way[waterway][oneway=-1] {
79 throwWarning: tr("{0} is unnecessary for {1}. The flow direction is defined by the way direction.", "{1.key}", "{0.key}");
80 group: tr("unnecessary tag");
81}
82
83/* #15774 */
84node[emergency=fire_hydrant][fire_hydrant:count=1] {
85 throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}");
86 group: tr("unnecessary tag");
87 fixRemove: "{1.key}";
88}
89
90/* #17100 */
91*[name][name=~/^(?i)(parking|parkplatz)$/][amenity=parking],
92*[name][name=~/^(?i)(playground|spielplatz)$/][leisure=playground],
93*[name][name=~/^(?i)(shop)$/][shop][shop!=no],
94*[name][name=~/^(?i)(building|house)$/][building][building!=no],
95*[name][name=~/^(?i)(kiosk)$/][shop=kiosk],
96*[name][name=~/^(?i)(cemetery|cmentarz)$/][amenity=graveyard],
97*[name][name=~/^(?i)(cemetery|cmentarz)$/][amenity=cemetery] {
98 throwWarning: tr("{0}", "{0.tag}");
99 group: tr("descriptive name");
100 fixRemove: "name";
101 assertMatch: "way name=parking amenity=parking";
102 assertMatch: "way name=Parking amenity=parking";
103 assertMatch: "node name=parking amenity=parking";
104 assertMatch: "node name=Parking amenity=parking";
105 assertNoMatch: "node name=Parking_with_suffix amenity=parking";
106 assertNoMatch: "node name=Megaparking amenity=parking";
107 assertMatch: "relation name=parking amenity=parking type=multipolygon";
108 assertMatch: "relation name=Parking amenity=parking type=multipolygon";
109 assertNoMatch: "way name=parking";
110 assertMatch: "relation name=PLAYGROUND leisure=playground type=multipolygon";
111 assertMatch: "node name=PLaYGrOUNd leisure=playground";
112 assertNoMatch: "way name=playground";
113 assertMatch: "node name=shop shop=whatever";
114 assertNoMatch: "node name=shop shop=no";
115 assertNoMatch: "way name=shop leisure=playground";
116 assertMatch: "way name=building building=yes";
117 assertNoMatch: "way building=yes";
118 assertMatch: "way name=kiosk building=yes shop=kiosk";
119 assertNoMatch: "way name=kiosk building=yes";
120 assertMatch: "way name=cemetery amenity=graveyard";
121 assertMatch: "way name=cmentarz amenity=graveyard";
122 assertMatch: "way name=Cmentarz amenity=graveyard";
123 assertNoMatch: "way name=kiosk amenity=graveyard";
124}
Note: See TracBrowser for help on using the repository browser.