source: josm/trunk/resources/data/validator/unnecessary.mapcss@ 17387

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

see #15667, fix #19930 - Downgrade warning about oneway on waterway to info level for navigable waterways

  • Property svn:eol-style set to native
File size: 7.7 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.tag}", "{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.tag}", "{1.tag}");
35 group: tr("unnecessary tag");
36 fixRemove: "{2.key}";
37}
38
39*[gnis:Class="Populated Place"][place=city],
40*[gnis:Class="Populated Place"][place=town],
41*[gnis:Class="Populated Place"][place=village],
42*[gnis:Class="Populated Place"][place=hamlet],
43*[gnis:Class=Summit][natural=peak] {
44 throwWarning: tr("{0} is unnecessary for {1}", "{0.tag}", "{1.tag}");
45 group: tr("unnecessary tag");
46 fixRemove: "{0.key}";
47 assertMatch: "node gnis:Class=\"Populated Place\" place=village";
48 assertNoMatch: "node gnis:Class=\"Populated Place\" place=locality";
49}
50
51*[emergency=permissive] {
52 /* see #9458 - emergency=permissive makes no sense */
53 throwWarning: tr("{0} makes no sense", "{0.tag}");
54 fixAdd: "emergency=yes";
55 assertMatch: "way emergency=permissive";
56 assertNoMatch: "way emergency=designated";
57}
58
59/* see ticket #7639 -- Warn when a node has the same tags as its parent way. */
60way >:sameTags node:tagged {
61 throwWarning: tr("Nodes duplicating parent way tags");
62}
63
64/* #15477 */
65*[payment:cash][payment:coins][payment:notes] {
66 throwWarning: tr("{0} together with {1} and {2}. Remove {0}.", "{0.key}", "{1.key}", "{2.key}");
67 group: tr("unnecessary tag");
68 fixRemove: "payment:cash";
69}
70
71/* #15774 */
72node[emergency=fire_hydrant][fire_hydrant:count=1] {
73 throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}");
74 group: tr("unnecessary tag");
75 fixRemove: "{1.key}";
76}
77
78/* #17100, #17471, #17629, #17633, #19274, #19395, #19409 */
79*[name][name=~/^(?i)(library|biblioteca|biblioteka|bibliothek|bibliotheek)$/][amenity=library],
80*[name][name=~/^(?i)(parc|park)$/][leisure=park],
81*[name][name=~/^(?i)(pond)$/][water=pond],
82*[name][name=~/^(?i)(church|église|biserica)$/][amenity=place_of_worship][religion=christian],
83*[name][name=~/^(?i)(mosque|cami|masjid|مسجد)$/][amenity=place_of_worship][religion=muslim],
84*[name][name=~/^(?i)(parking|parkplatz)$/][amenity=parking],
85*[name][name=~/^(?i)(post office)$/][amenity=post_office],
86*[name][name=~/^(?i)(restaurant)$/][amenity=restaurant],
87*[name][name=~/^(?i)(toilets?)$/][amenity=toilets],
88*[name][name=~/^(?i)(playground|spielplatz)$/][leisure=playground],
89*[name][name=~/^(?i)(shop|boutique)$/][shop][shop!=no],
90*[name][name=~/^(?i)(building|bangunan)$/][building][building!=no],
91*[name][name=~/^(?i)(house|maison|rumah|vivienda)$/][building=house],
92*[name][name=~/^(?i)(casa)$/][building=house][outside("FR")], /* spanish for house but it is a brand name in France */
93*[name][name=~/^(?i)(kiosk)$/][shop=kiosk][outside("NL")], /* it is a brand name in the Netherlands */
94*[name][name=~/^(?i)(path)$/][highway=path],
95*[name][name=~/^(?i)(jalan)$/][highway],
96*[name][name=~/^(?i)(silo)$/][man_made=silo],
97*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][amenity=grave_yard],
98*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][landuse=cemetery],
99*[name][name=~/^(?i)(monument aux morts|war memorial)$/][historic=memorial][memorial=war_memorial],
100*[name][name=~/^(?i)(school|école|Школа)$/][amenity=school],
101*[name][name=~/^(?i)(école élémentaire)$/][amenity=school]["school:FR"="élémentaire"],
102*[name][name=~/^(?i)(école maternelle)$/][amenity=school]["school:FR"="maternelle"],
103*[name][name=~/^(?i)(école primaire)$/][amenity=school]["school:FR"="primaire"],
104*[name][name=~/^(?i)(collège)$/][amenity=school]["school:FR"="collège"],
105*[name][name=~/^(?i)(lycée)$/][amenity=school]["school:FR"="lycée"],
106*[name][name=~/^(?i)(Аптека|farmacia|pharmacy|pharmacie)$/][amenity=pharmacy],
107*[name][name=~/^(?i)(hydrant)$/][emergency=fire_hydrant],
108*[name][name=~/^(?i)(АГЗС|АЗС)$/][amenity=fuel] {
109 throwWarning: tr("{0}", "{0.tag}");
110 group: tr("descriptive name");
111 fixRemove: "name";
112 assertMatch: "node name=parking amenity=parking";
113 assertMatch: "node name=Parking amenity=parking";
114 assertNoMatch: "node name=Parking_with_suffix amenity=parking";
115 assertNoMatch: "node name=Megaparking amenity=parking";
116 assertMatch: "relation name=parking amenity=parking type=multipolygon";
117 assertMatch: "relation name=Parking amenity=parking type=multipolygon";
118 assertNoMatch: "way name=parking";
119 assertMatch: "relation name=PLAYGROUND leisure=playground type=multipolygon";
120 assertMatch: "node name=PLaYGrOUNd leisure=playground";
121 assertMatch: "node name=shop shop=whatever";
122 assertNoMatch: "node name=shop shop=no";
123 assertNoMatch: "way name=shop leisure=playground";
124 assertMatch: "way name=building building=yes";
125 assertMatch: "way name=building building=house";
126 assertMatch: "way name=Rumah building=house";
127 assertNoMatch: "way name=Rumah building=yes";
128 assertMatch: "way name=house building=house";
129 assertNoMatch: "way name=house building=yes";
130 assertMatch: "way name=kiosk building=yes shop=kiosk";
131 assertNoMatch: "way name=kiosk building=yes";
132 assertMatch: "way name=silo man_made=silo";
133 assertMatch: "way name=Silo man_made=silo building=silo";
134 assertNoMatch: "way name=Silo building=silo";
135 assertMatch: "way name=cemetery amenity=grave_yard";
136 assertMatch: "way name=Cmentarz amenity=grave_yard";
137 assertNoMatch: "way name=kiosk amenity=grave_yard";
138}
139 /* the following without fixRemove to avoid information loss, should be checked manually */
140*[name][name=~/^(?i)(chapel|chapelle|kapelle)$/], /* check if amenity=place_of_worship and/or building=chapel applies */
141*[name][name=~/^(?i)(silo)$/][man_made!=silo], /* check if man_made=silo and/or building=silo applies */
142*[name][name=~/^(?i)(school|école|Школа)$/][amenity!=school], /* check if amenity=school and/or building=school applies applies */
143*[name][name=~/^(?i)(house|rumah|vivienda)$/][building][building!=house][building!=no], /* check if building=house applies */
144*[name][name=~/^(?i)(casa)$/][building][building!=house][building!=no][outside("FR")] { /* check if building=house applies */
145 throwWarning: tr("{0}", "{0.tag}");
146 group: tr("descriptive name");
147 assertMatch: "way name=Silo building=silo";
148 assertNoMatch: "way name=building building=yes";
149 assertNoMatch: "way name=building building=house";
150 assertNoMatch: "way name=Rumah building=house";
151 assertMatch: "way name=Rumah building=yes";
152 assertNoMatch: "way name=house building=house";
153 assertMatch: "way name=house building=yes";
154}
155
156/* #2760 */
157*[/^(gpx|gpxx|gpxd):/] {
158 throwWarning: tr("{0} should not be uploaded", "{0.key}");
159 group: tr("unnecessary tag");
160 fixRemove: "{0.key}";
161 assertMatch: "node gpx:time=2018-01-01T12:00:00Z";
162 assertMatch: "node gpxd:color=#FF0000";
163 assertNoMatch: "node source=gpx:foo";
164}
Note: See TracBrowser for help on using the repository browser.