File: unnecessary.mapcss

package info (click to toggle)
josm 0.0.svn17428%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 204,760 kB
  • sloc: java: 360,765; xml: 198,972; perl: 10,138; jsp: 250; sh: 123; makefile: 112; javascript: 74; python: 29
file content (164 lines) | stat: -rw-r--r-- 7,897 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
*[access][highway=proposed],
*[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)$/],
*[bridge=no],
*[building=no],
*[elevation="0"],
*[layer="0"] {
  /* see #9365 - Useless tag layer=0 */
  throwWarning: tr("{0} is unnecessary", "{0.tag}");
  group: tr("unnecessary tag");
  fixRemove: "{0.key}";
  assertMatch: "way layer=0";
  assertMatch: "way bridge=no";
  assertMatch: "way highway=proposed access=no";
  assertMatch: "way highway=motorway motor_vehicle=yes";
  assertNoMatch: "way highway=motorway access=no motor_vehicle=yes";
}

area:closed[amenity ][area?][!highway],
area:closed[building][area?],
area:closed[landuse ][area?][!highway],
area:closed[leisure ][area?][!highway][leisure!=track][leisure!=slipway],
area:closed[natural ][area?],
area:closed[shop    ][area?] {
  throwWarning: tr("{0} is unnecessary for {1}", "{2.tag}", "{1.key}");
  group: tr("unnecessary tag");
  fixRemove: "{2.key}";
}

/* #14256, #15664 */
area:closed[highway=rest_area][area?],
area:closed[highway=services][area?],
area:closed[aeroway=aerodrome][area?],
area:closed[aeroway=helipad][area?] {
  throwWarning: tr("{0} is unnecessary for {1}", "{2.tag}", "{1.tag}");
  group: tr("unnecessary tag");
  fixRemove: "{2.key}";
}

*[gnis:Class="Populated Place"][place=city],
*[gnis:Class="Populated Place"][place=town],
*[gnis:Class="Populated Place"][place=village],
*[gnis:Class="Populated Place"][place=hamlet],
*[gnis:Class=Summit][natural=peak] {
  throwWarning: tr("{0} is unnecessary for {1}", "{0.tag}", "{1.tag}");
  group: tr("unnecessary tag");
  fixRemove: "{0.key}";
  assertMatch: "node gnis:Class=\"Populated Place\" place=village";
  assertNoMatch: "node gnis:Class=\"Populated Place\" place=locality";
}

*[emergency=permissive] {
  /* see #9458 - emergency=permissive makes no sense */
  throwWarning: tr("{0} makes no sense", "{0.tag}");
  fixAdd: "emergency=yes";
  assertMatch: "way emergency=permissive";
  assertNoMatch: "way emergency=designated";
}

/* see ticket #7639 -- Warn when a node has the same tags as its parent way. */
way >:sameTags node:tagged {
  throwWarning: tr("Nodes duplicating parent way tags");
}

/* #15477 */
*[payment:cash][payment:coins][payment:notes] {
  throwWarning: tr("{0} together with {1} and {2}. Remove {0}.", "{0.key}", "{1.key}", "{2.key}");
  group: tr("unnecessary tag");
  fixRemove: "payment:cash";
}

/* #15774 */
node[emergency=fire_hydrant][fire_hydrant:count=1] {
  throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}");
  group: tr("unnecessary tag");
  fixRemove: "{1.key}";
}

/* #17100, #17471, #17629, #17633, #19274, #19395, #19409 */
*[name][name=~/^(?i)(library|biblioteca|biblioteka|bibliothek|bibliotheek)$/][amenity=library],
*[name][name=~/^(?i)(parc|park)$/][leisure=park],
*[name][name=~/^(?i)(pond)$/][water=pond],
*[name][name=~/^(?i)(church|église|biserica)$/][amenity=place_of_worship][religion=christian],
*[name][name=~/^(?i)(mosque|cami|masjid|مسجد)$/][amenity=place_of_worship][religion=muslim],
*[name][name=~/^(?i)(parking|parkplatz)$/][amenity=parking],
*[name][name=~/^(?i)(post office)$/][amenity=post_office],
*[name][name=~/^(?i)(restaurant)$/][amenity=restaurant],
*[name][name=~/^(?i)(toilets?)$/][amenity=toilets],
*[name][name=~/^(?i)(playground|spielplatz)$/][leisure=playground],
*[name][name=~/^(?i)(shop|boutique)$/][shop][shop!=no],
*[name][name=~/^(?i)(building|bangunan)$/][building][building!=no],
*[name][name=~/^(?i)(house|maison|rumah|vivienda)$/][building=house],
*[name][name=~/^(?i)(casa)$/][building=house][outside("FR")], /* spanish for house but it is a brand name in France */
*[name][name=~/^(?i)(kiosk)$/][shop=kiosk][outside("NL")], /* it is a brand name in the Netherlands */
*[name][name=~/^(?i)(path)$/][highway=path],
*[name][name=~/^(?i)(jalan)$/][highway],
*[name][name=~/^(?i)(silo)$/][man_made=silo],
*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][amenity=grave_yard],
*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][landuse=cemetery],
*[name][name=~/^(?i)(monument aux morts|war memorial)$/][historic=memorial][memorial=war_memorial],
*[name][name=~/^(?i)(school|école|Школа)$/][amenity=school],
*[name][name=~/^(?i)(école élémentaire)$/][amenity=school]["school:FR"="élémentaire"],
*[name][name=~/^(?i)(école maternelle)$/][amenity=school]["school:FR"="maternelle"],
*[name][name=~/^(?i)(école primaire)$/][amenity=school]["school:FR"="primaire"],
*[name][name=~/^(?i)(collège)$/][amenity=school]["school:FR"="collège"],
*[name][name=~/^(?i)(lycée)$/][amenity=school]["school:FR"="lycée"],
*[name][name=~/^(?i)(Аптека|farmacia|pharmacy|pharmacie)$/][amenity=pharmacy],
*[name][name=~/^(?i)(hydrant)$/][emergency=fire_hydrant],
*[name][name=~/^(?i)(АГЗС|АЗС)$/][amenity=fuel] {
  throwWarning: tr("{0}", "{0.tag}");
  group: tr("descriptive name");
  fixRemove: "name";
  assertMatch: "node name=parking amenity=parking";
  assertMatch: "node name=Parking amenity=parking";
  assertNoMatch: "node name=Parking_with_suffix amenity=parking";
  assertNoMatch: "node name=Megaparking amenity=parking";
  assertMatch: "relation name=parking amenity=parking type=multipolygon";
  assertMatch: "relation name=Parking amenity=parking type=multipolygon";
  assertNoMatch: "way name=parking";
  assertMatch: "relation name=PLAYGROUND leisure=playground type=multipolygon";
  assertMatch: "node name=PLaYGrOUNd leisure=playground";
  assertMatch: "node name=shop shop=whatever";
  assertNoMatch: "node name=shop shop=no";
  assertNoMatch: "way name=shop leisure=playground";
  assertMatch: "way name=building building=yes";
  assertMatch: "way name=building building=house";
  assertMatch: "way name=Rumah building=house";
  assertNoMatch: "way name=Rumah building=yes";
  assertMatch: "way name=house building=house";
  assertNoMatch: "way name=house building=yes";
  assertMatch: "way name=kiosk building=yes shop=kiosk";
  assertNoMatch: "way name=kiosk building=yes";
  assertMatch: "way name=silo man_made=silo";
  assertMatch: "way name=Silo man_made=silo building=silo";
  assertNoMatch: "way name=Silo building=silo";
  assertMatch: "way name=cemetery amenity=grave_yard";
  assertMatch: "way name=Cmentarz amenity=grave_yard";
  assertNoMatch: "way name=kiosk amenity=grave_yard";
}
  /* the following without fixRemove to avoid information loss, should be checked manually */
*[name][name=~/^(?i)(chapel|chapelle|kapelle)$/], /* check if amenity=place_of_worship and/or building=chapel applies */
*[name][name=~/^(?i)(silo)$/][man_made!=silo], /* check if man_made=silo and/or building=silo applies */
*[name][name=~/^(?i)(school|école|Школа)$/][amenity!=school], /* check if amenity=school and/or building=school applies applies */
*[name][name=~/^(?i)(house|rumah|vivienda)$/][building][building!=house][building!=no], /* check if building=house applies */
*[name][name=~/^(?i)(casa)$/][building][building!=house][building!=no][outside("FR")] { /* check if building=house applies */
  throwWarning: tr("{0}", "{0.tag}");
  group: tr("descriptive name");
  assertMatch: "way name=Silo building=silo";
  assertNoMatch: "way name=building building=yes";
  assertNoMatch: "way name=building building=house";
  assertNoMatch: "way name=Rumah building=house";
  assertMatch: "way name=Rumah building=yes";
  assertNoMatch: "way name=house building=house";
  assertMatch: "way name=house building=yes";
}

/* #2760 */
*[/^(gpx|gpxx|gpxd):/] {
  throwWarning: tr("{0} should not be uploaded", "{0.key}");
  group: tr("unnecessary tag");
  fixRemove: "{0.key}";
  assertMatch: "node gpx:time=2018-01-01T12:00:00Z";
  assertMatch: "node gpxd:color=#FF0000";
  assertNoMatch: "node source=gpx:foo";
}