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

Last change on this file since 18446 was 18271, checked in by GerdP, 3 years ago

fix #20681: Unnecessary tag area=yes not reported for waterway=riverbank

  • add check for waterway=riverbank
  • change filter area to way to avoid duplicate warnings for relations with area=yes
  • Property svn:eol-style set to native
File size: 7.9 KB
RevLine 
[6548]1*[access][highway=proposed],
[6698]2*[bridge=no],
[6788]3*[building=no],
[6760]4*[elevation="0"],
[6548]5*[layer="0"] {
6 /* see #9365 - Useless tag layer=0 */
7 throwWarning: tr("{0} is unnecessary", "{0.tag}");
[11153]8 group: tr("unnecessary tag");
[6548]9 fixRemove: "{0.key}";
10 assertMatch: "way layer=0";
[6698]11 assertMatch: "way bridge=no";
[6548]12 assertMatch: "way highway=proposed access=no";
[17947]13}
14
15/* #19996 */
16*[motor_vehicle?][!vehicle][!access][bicycle_road!=yes][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link)$/] {
17 throwOther: tr("{0} is optional on {1}", "{0.tag}", "{4.tag}");
[14918]18 assertMatch: "way highway=motorway motor_vehicle=yes";
19 assertNoMatch: "way highway=motorway access=no motor_vehicle=yes";
[6548]20}
21
[17957]22way:closed[amenity ][area?][!highway],
23way:closed[building][area?],
24way:closed[landuse ][area?][!highway],
25way:closed[leisure ][area?][!highway][leisure!=track][leisure!=slipway],
26way:closed[natural ][area?],
27way:closed[shop ][area?] {
[16856]28 throwWarning: tr("{0} is unnecessary for {1}", "{2.tag}", "{1.key}");
[11153]29 group: tr("unnecessary tag");
[6778]30 fixRemove: "{2.key}";
31}
32
[18271]33/* #14256, #15664, #20681 */
34way:closed[highway=rest_area][area?],
35way:closed[highway=services][area?],
36way:closed[aeroway=aerodrome][area?],
37way:closed[waterway=riverbank][area?],
38way:closed[aeroway=helipad][area?] {
[16856]39 throwWarning: tr("{0} is unnecessary for {1}", "{2.tag}", "{1.tag}");
[11476]40 group: tr("unnecessary tag");
41 fixRemove: "{2.key}";
42}
43
[14954]44*[gnis:Class="Populated Place"][place=city],
45*[gnis:Class="Populated Place"][place=town],
46*[gnis:Class="Populated Place"][place=village],
47*[gnis:Class="Populated Place"][place=hamlet],
[14953]48*[gnis:Class=Summit][natural=peak] {
[14901]49 throwWarning: tr("{0} is unnecessary for {1}", "{0.tag}", "{1.tag}");
50 group: tr("unnecessary tag");
51 fixRemove: "{0.key}";
[15761]52 assertMatch: "node gnis:Class=\"Populated Place\" place=village";
53 assertNoMatch: "node gnis:Class=\"Populated Place\" place=locality";
[14901]54}
55
[6548]56*[emergency=permissive] {
57 /* see #9458 - emergency=permissive makes no sense */
[14987]58 throwWarning: tr("{0} makes no sense", "{0.tag}");
[6548]59 fixAdd: "emergency=yes";
60 assertMatch: "way emergency=permissive";
61 assertNoMatch: "way emergency=designated";
62}
[6629]63
64/* see ticket #7639 -- Warn when a node has the same tags as its parent way. */
65way >:sameTags node:tagged {
66 throwWarning: tr("Nodes duplicating parent way tags");
[7258]67}
[13075]68
69/* #15477 */
70*[payment:cash][payment:coins][payment:notes] {
71 throwWarning: tr("{0} together with {1} and {2}. Remove {0}.", "{0.key}", "{1.key}", "{2.key}");
72 group: tr("unnecessary tag");
73 fixRemove: "payment:cash";
[13378]74}
75
[14593]76/* #15774 */
77node[emergency=fire_hydrant][fire_hydrant:count=1] {
78 throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}");
79 group: tr("unnecessary tag");
80 fixRemove: "{1.key}";
[14884]81}
82
[16686]83/* #17100, #17471, #17629, #17633, #19274, #19395, #19409 */
[16484]84*[name][name=~/^(?i)(library|biblioteca|biblioteka|bibliothek|bibliotheek)$/][amenity=library],
[15044]85*[name][name=~/^(?i)(parc|park)$/][leisure=park],
[15005]86*[name][name=~/^(?i)(pond)$/][water=pond],
87*[name][name=~/^(?i)(church|église|biserica)$/][amenity=place_of_worship][religion=christian],
88*[name][name=~/^(?i)(mosque|cami|masjid|مسجد)$/][amenity=place_of_worship][religion=muslim],
[14885]89*[name][name=~/^(?i)(parking|parkplatz)$/][amenity=parking],
[15005]90*[name][name=~/^(?i)(post office)$/][amenity=post_office],
91*[name][name=~/^(?i)(restaurant)$/][amenity=restaurant],
92*[name][name=~/^(?i)(toilets?)$/][amenity=toilets],
[14885]93*[name][name=~/^(?i)(playground|spielplatz)$/][leisure=playground],
[15005]94*[name][name=~/^(?i)(shop|boutique)$/][shop][shop!=no],
95*[name][name=~/^(?i)(building|bangunan)$/][building][building!=no],
[16654]96*[name][name=~/^(?i)(house|maison|rumah|vivienda)$/][building=house],
97*[name][name=~/^(?i)(casa)$/][building=house][outside("FR")], /* spanish for house but it is a brand name in France */
[16686]98*[name][name=~/^(?i)(kiosk)$/][shop=kiosk][outside("NL")], /* it is a brand name in the Netherlands */
[15005]99*[name][name=~/^(?i)(path)$/][highway=path],
[14911]100*[name][name=~/^(?i)(jalan)$/][highway],
101*[name][name=~/^(?i)(silo)$/][man_made=silo],
[15005]102*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][amenity=grave_yard],
103*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][landuse=cemetery],
104*[name][name=~/^(?i)(monument aux morts|war memorial)$/][historic=memorial][memorial=war_memorial],
105*[name][name=~/^(?i)(school|école|Школа)$/][amenity=school],
106*[name][name=~/^(?i)(école élémentaire)$/][amenity=school]["school:FR"="élémentaire"],
107*[name][name=~/^(?i)(école maternelle)$/][amenity=school]["school:FR"="maternelle"],
108*[name][name=~/^(?i)(école primaire)$/][amenity=school]["school:FR"="primaire"],
109*[name][name=~/^(?i)(collège)$/][amenity=school]["school:FR"="collège"],
110*[name][name=~/^(?i)(lycée)$/][amenity=school]["school:FR"="lycée"],
111*[name][name=~/^(?i)(Аптека|farmacia|pharmacy|pharmacie)$/][amenity=pharmacy],
[15255]112*[name][name=~/^(?i)(hydrant)$/][emergency=fire_hydrant],
[15005]113*[name][name=~/^(?i)(АГЗС|АЗС)$/][amenity=fuel] {
[14884]114 throwWarning: tr("{0}", "{0.tag}");
115 group: tr("descriptive name");
116 fixRemove: "name";
117 assertMatch: "node name=parking amenity=parking";
118 assertMatch: "node name=Parking amenity=parking";
119 assertNoMatch: "node name=Parking_with_suffix amenity=parking";
120 assertNoMatch: "node name=Megaparking amenity=parking";
121 assertMatch: "relation name=parking amenity=parking type=multipolygon";
122 assertMatch: "relation name=Parking amenity=parking type=multipolygon";
123 assertNoMatch: "way name=parking";
124 assertMatch: "relation name=PLAYGROUND leisure=playground type=multipolygon";
125 assertMatch: "node name=PLaYGrOUNd leisure=playground";
126 assertMatch: "node name=shop shop=whatever";
127 assertNoMatch: "node name=shop shop=no";
128 assertNoMatch: "way name=shop leisure=playground";
129 assertMatch: "way name=building building=yes";
[14911]130 assertMatch: "way name=building building=house";
131 assertMatch: "way name=Rumah building=house";
132 assertNoMatch: "way name=Rumah building=yes";
133 assertMatch: "way name=house building=house";
134 assertNoMatch: "way name=house building=yes";
[14884]135 assertMatch: "way name=kiosk building=yes shop=kiosk";
136 assertNoMatch: "way name=kiosk building=yes";
[14911]137 assertMatch: "way name=silo man_made=silo";
138 assertMatch: "way name=Silo man_made=silo building=silo";
[16858]139 assertNoMatch: "way name=Silo building=silo";
[15005]140 assertMatch: "way name=cemetery amenity=grave_yard";
141 assertMatch: "way name=Cmentarz amenity=grave_yard";
142 assertNoMatch: "way name=kiosk amenity=grave_yard";
[15044]143}
[16860]144 /* the following without fixRemove to avoid information loss, should be checked manually */
[17630]145*[name][name=~/^(?i)(chapel|chapelle|kapelle)$/][tag("building")=="chapel"||tag("amenity")=="place_of_worship"], /* check if amenity=place_of_worship and/or building=chapel applies */
[16858]146*[name][name=~/^(?i)(silo)$/][man_made!=silo], /* check if man_made=silo and/or building=silo applies */
147*[name][name=~/^(?i)(school|école|Школа)$/][amenity!=school], /* check if amenity=school and/or building=school applies applies */
148*[name][name=~/^(?i)(house|rumah|vivienda)$/][building][building!=house][building!=no], /* check if building=house applies */
149*[name][name=~/^(?i)(casa)$/][building][building!=house][building!=no][outside("FR")] { /* check if building=house applies */
[14911]150 throwWarning: tr("{0}", "{0.tag}");
151 group: tr("descriptive name");
[16858]152 assertMatch: "way name=Silo building=silo";
[14911]153 assertNoMatch: "way name=building building=yes";
154 assertNoMatch: "way name=building building=house";
155 assertNoMatch: "way name=Rumah building=house";
156 assertMatch: "way name=Rumah building=yes";
157 assertNoMatch: "way name=house building=house";
158 assertMatch: "way name=house building=yes";
[15044]159}
[15419]160
161/* #2760 */
[17593]162*[/^gpx:/],
163*[/^gpxx:/],
164*[/^gpxd:/] {
[15419]165 throwWarning: tr("{0} should not be uploaded", "{0.key}");
166 group: tr("unnecessary tag");
167 fixRemove: "{0.key}";
168 assertMatch: "node gpx:time=2018-01-01T12:00:00Z";
[15496]169 assertMatch: "node gpxd:color=#FF0000";
[15419]170 assertNoMatch: "node source=gpx:foo";
171}
Note: See TracBrowser for help on using the repository browser.