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

Last change on this file since 14911 was 14911, checked in by Klumbumbus, 5 years ago

fix #17100, see #17471 - add name=silo|rumah|jalan to descriptive name warning, move АЗС there too, disable autofix for cases where the value of the name tag could be the value of the other tag (manual fix by human required in these cases)

  • Property svn:eol-style set to native
File size: 5.6 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, #17471 */
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)$/][building][building!=no],
95*[name][name=~/^(?i)(house|rumah)$/][building=house],
96*[name][name=~/^(?i)(kiosk)$/][shop=kiosk],
97*[name][name=~/^(?i)(jalan)$/][highway],
98*[name][name=~/^(?i)(silo)$/][man_made=silo],
99*[name][name=~/^(?i)(silo)$/][building=silo],
100*[name][name=~/^(?i)(cemetery|cmentarz)$/][amenity=graveyard],
101*[name][name=~/^(?i)(cemetery|cmentarz)$/][amenity=cemetery],
102*[name="АЗС"][amenity=fuel] {
103 throwWarning: tr("{0}", "{0.tag}");
104 group: tr("descriptive name");
105 fixRemove: "name";
106 assertMatch: "node name=parking amenity=parking";
107 assertMatch: "node name=Parking amenity=parking";
108 assertNoMatch: "node name=Parking_with_suffix amenity=parking";
109 assertNoMatch: "node name=Megaparking amenity=parking";
110 assertMatch: "relation name=parking amenity=parking type=multipolygon";
111 assertMatch: "relation name=Parking amenity=parking type=multipolygon";
112 assertNoMatch: "way name=parking";
113 assertMatch: "relation name=PLAYGROUND leisure=playground type=multipolygon";
114 assertMatch: "node name=PLaYGrOUNd leisure=playground";
115 assertMatch: "node name=shop shop=whatever";
116 assertNoMatch: "node name=shop shop=no";
117 assertNoMatch: "way name=shop leisure=playground";
118 assertMatch: "way name=building building=yes";
119 assertMatch: "way name=building building=house";
120 assertMatch: "way name=Rumah building=house";
121 assertNoMatch: "way name=Rumah building=yes";
122 assertMatch: "way name=house building=house";
123 assertNoMatch: "way name=house building=yes";
124 assertMatch: "way name=kiosk building=yes shop=kiosk";
125 assertNoMatch: "way name=kiosk building=yes";
126 assertMatch: "way name=silo man_made=silo";
127 assertMatch: "way name=Silo man_made=silo building=silo";
128 assertMatch: "way name=Silo building=silo";
129 assertMatch: "way name=cemetery amenity=graveyard";
130 assertMatch: "way name=Cmentarz amenity=graveyard";
131 assertNoMatch: "way name=kiosk amenity=graveyard";
132}
133*[name][name=~/^(?i)(house|rumah)$/][building][building!=house][building!=no] {
134 throwWarning: tr("{0}", "{0.tag}");
135 group: tr("descriptive name");
136 /* without fixRemove to avoid possible information loss */
137 assertNoMatch: "way name=building building=yes";
138 assertNoMatch: "way name=building building=house";
139 assertNoMatch: "way name=Rumah building=house";
140 assertMatch: "way name=Rumah building=yes";
141 assertNoMatch: "way name=house building=house";
142 assertMatch: "way name=house building=yes";
143}
Note: See TracBrowser for help on using the repository browser.