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

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

fix #17547 - For places and peaks tagged correctly, gnis:Class is useless

  • Property svn:eol-style set to native
File size: 6.0 KB
Line 
1*[access][highway=proposed],
2*[motor_vehicle?][!vehicle][!access][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 assertMatch: "way highway=motorway motor_vehicle=yes";
15 assertNoMatch: "way highway=motorway access=no motor_vehicle=yes";
16}
17
18area:closed[amenity ][area?][!highway],
19area:closed[building][area?],
20area:closed[landuse ][area?][!highway],
21area:closed[leisure ][area?][!highway][leisure!=track][leisure!=slipway],
22area:closed[natural ][area?],
23area:closed[shop ][area?] {
24 throwWarning: tr("{0} is unnecessary for {1}", "{2.key}", "{1.key}");
25 group: tr("unnecessary tag");
26 fixRemove: "{2.key}";
27}
28
29/* #14256, #15664 */
30area:closed[highway=rest_area][area?],
31area:closed[highway=services][area?],
32area:closed[aeroway=aerodrome][area?],
33area:closed[aeroway=helipad][area?] {
34 throwWarning: tr("{0} is unnecessary for {1}", "{2.key}", "{1.tag}");
35 group: tr("unnecessary tag");
36 fixRemove: "{2.key}";
37}
38
39/* #9257, #17482 */
40way[foot =~ /^(yes|designated)$/][highway =~ /^(footway|pedestrian)$/][!access],
41way[bicycle =~ /^(yes|designated)$/][highway=cycleway][!vehicle][!access][foot!=designated],
42*[building:ruian:type=2][building=farm_auxiliary],
43*[building:ruian:type=7][building=house],
44*[building:ruian:type=11][building=hotel],
45*[building:ruian:type=12][building=warehouse],
46*[building:ruian:type=13][building=barn],
47*[building:ruian:type=18][building=garage],
48*[building:ruian:type=21][building=greenhouse],
49*[gnis:Class="Populated Place"][place],
50*[gnis:Class=Summit][natural=peak] {
51 throwWarning: tr("{0} is unnecessary for {1}", "{0.tag}", "{1.tag}");
52 group: tr("unnecessary tag");
53 fixRemove: "{0.key}";
54 assertMatch: "way highway=pedestrian foot=designated";
55 assertNoMatch: "way highway=pedestrian access=no foot=designated";
56}
57
58*[emergency=permissive] {
59 /* see #9458 - emergency=permissive makes no sense */
60 throwWarning: tr("{0} makes no sense", "{0.tag");
61 fixAdd: "emergency=yes";
62 assertMatch: "way emergency=permissive";
63 assertNoMatch: "way emergency=designated";
64}
65
66/* see ticket #7639 -- Warn when a node has the same tags as its parent way. */
67way >:sameTags node:tagged {
68 throwWarning: tr("Nodes duplicating parent way tags");
69}
70
71/* #15477 */
72*[payment:cash][payment:coins][payment:notes] {
73 throwWarning: tr("{0} together with {1} and {2}. Remove {0}.", "{0.key}", "{1.key}", "{2.key}");
74 group: tr("unnecessary tag");
75 fixRemove: "payment:cash";
76}
77
78/* see #10346, #15667 */
79way[waterway][oneway?] {
80 throwWarning: tr("{0} is unnecessary for {1}", "{1.key}", "{0.key}");
81 group: tr("unnecessary tag");
82 fixRemove: "{1.key}";
83}
84way[waterway][oneway=-1] {
85 throwWarning: tr("{0} is unnecessary for {1}. The flow direction is defined by the way direction.", "{1.key}", "{0.key}");
86 group: tr("unnecessary tag");
87}
88
89/* #15774 */
90node[emergency=fire_hydrant][fire_hydrant:count=1] {
91 throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}");
92 group: tr("unnecessary tag");
93 fixRemove: "{1.key}";
94}
95
96/* #17100, #17471 */
97*[name][name=~/^(?i)(parking|parkplatz)$/][amenity=parking],
98*[name][name=~/^(?i)(playground|spielplatz)$/][leisure=playground],
99*[name][name=~/^(?i)(shop)$/][shop][shop!=no],
100*[name][name=~/^(?i)(building)$/][building][building!=no],
101*[name][name=~/^(?i)(house|rumah)$/][building=house],
102*[name][name=~/^(?i)(kiosk)$/][shop=kiosk],
103*[name][name=~/^(?i)(jalan)$/][highway],
104*[name][name=~/^(?i)(silo)$/][man_made=silo],
105*[name][name=~/^(?i)(silo)$/][building=silo],
106*[name][name=~/^(?i)(cemetery|cmentarz)$/][amenity=graveyard],
107*[name][name=~/^(?i)(cemetery|cmentarz)$/][amenity=cemetery],
108*[name="АГЗС"][amenity=fuel],
109*[name="АЗС"][amenity=fuel] {
110 throwWarning: tr("{0}", "{0.tag}");
111 group: tr("descriptive name");
112 fixRemove: "name";
113 assertMatch: "node name=parking amenity=parking";
114 assertMatch: "node name=Parking amenity=parking";
115 assertNoMatch: "node name=Parking_with_suffix amenity=parking";
116 assertNoMatch: "node name=Megaparking amenity=parking";
117 assertMatch: "relation name=parking amenity=parking type=multipolygon";
118 assertMatch: "relation name=Parking amenity=parking type=multipolygon";
119 assertNoMatch: "way name=parking";
120 assertMatch: "relation name=PLAYGROUND leisure=playground type=multipolygon";
121 assertMatch: "node name=PLaYGrOUNd leisure=playground";
122 assertMatch: "node name=shop shop=whatever";
123 assertNoMatch: "node name=shop shop=no";
124 assertNoMatch: "way name=shop leisure=playground";
125 assertMatch: "way name=building building=yes";
126 assertMatch: "way name=building building=house";
127 assertMatch: "way name=Rumah building=house";
128 assertNoMatch: "way name=Rumah building=yes";
129 assertMatch: "way name=house building=house";
130 assertNoMatch: "way name=house building=yes";
131 assertMatch: "way name=kiosk building=yes shop=kiosk";
132 assertNoMatch: "way name=kiosk building=yes";
133 assertMatch: "way name=silo man_made=silo";
134 assertMatch: "way name=Silo man_made=silo building=silo";
135 assertMatch: "way name=Silo building=silo";
136 assertMatch: "way name=cemetery amenity=graveyard";
137 assertMatch: "way name=Cmentarz amenity=graveyard";
138 assertNoMatch: "way name=kiosk amenity=graveyard";
139}
140*[name][name=~/^(?i)(house|rumah)$/][building][building!=house][building!=no] {
141 throwWarning: tr("{0}", "{0.tag}");
142 group: tr("descriptive name");
143 /* without fixRemove to avoid possible information loss */
144 assertNoMatch: "way name=building building=yes";
145 assertNoMatch: "way name=building building=house";
146 assertNoMatch: "way name=Rumah building=house";
147 assertMatch: "way name=Rumah building=yes";
148 assertNoMatch: "way name=house building=house";
149 assertMatch: "way name=house building=yes";
150}
Note: See TracBrowser for help on using the repository browser.