source: josm/trunk/data/validator/geometry.mapcss @ 9022

Last change on this file since 9022 was 9022, checked in by Klumbumbus, 4 years ago

drop support of natural=glacier on nodes

  • Property svn:eol-style set to native
File size: 7.4 KB
Line 
1/* {0} on a node, should be a way */
2node[oneway],
3node[bridge],
4node[sidewalk],
5node[footway],
6node[man_made=embankment],
7node[man_made=groyne],
8node[man_made=cutline],
9node[cutline],
10node[aerialway=cable_car],
11node[aerialway=gondola],
12node[aerialway=chair_lift],
13node[aerialway=mixed_lift],
14node[aerialway=drag_lift],
15node[aerialway=t-bar],
16node[aerialway=j-bar],
17node[aerialway=platter],
18node[aerialway=magic_carpet],
19node[aerialway=rope_tow],
20node[aerialway=goods],
21node[aeroway=taxiway],
22node[aeroway=runway],
23node[railway=rail],
24node[railway=narrow_gauge],
25node[railway=monorail],
26node[railway=preserved],
27node[railway=light_rail],
28node[railway=subway],
29node[railway=tram],
30node[railway=disused],
31node[railway=abandoned],
32node[waterway=river],
33node[waterway=canal],
34node[waterway=stream],
35node[waterway=ditch],
36node[waterway=drain],
37node[natural=coastline],
38node[natural=ridge],
39node[natural=valley],
40node[natural=tree_row] {
41  throwWarning: tr("{0} on a node. Should be used on a way.", "{0.tag}");
42  assertMatch: "node oneway=-1";
43  assertNoMatch: "way oneway=-1";
44  assertMatch: "node bridge=yes";
45  assertMatch: "node bridge=viaduct";
46}
47
48/* {0} on a node, should be an area; see ticket #10679 */
49node[landuse],
50node[natural=scree],
51node[natural=scrub],
52node[natural=fell],
53node[natural=heath],
54node[natural=wood],
55node[natural=grassland],
56node[natural=wetland],
57node[natural=water],
58node[natural=mud],
59node[natural=beach],
60node[natural=sand],
61node[natural=wood],
62node[natural=bare_rock],
63node[natural=glacier],
64node[waterway=riverbank],
65node[man_made=bridge],
66node[man_made=breakwater],
67node[aeroway=apron],
68node[power=plant],
69node[building:part],
70node[source:outline] {
71  throwWarning: tr("{0} on a node. Should be drawn as an area.", "{0.tag}");
72}
73
74/* {0} on a node, should be a relation; see #10252, #10769 */
75node[route],
76node[restriction] {
77  throwWarning: tr("{0}=* on a node. Should be used in a relation", "{0.key}"); 
78}
79
80/* {0} on a way, should be a node */
81way[entrance],
82way[man_made=survey_point],
83way[power=pole],
84way[amenity=vending_machine],
85way[natural=peak],
86way[natural=saddle],
87way[natural=volcano],
88way[natural=tree] {
89  throwWarning: tr("{0} on a way. Should be used on a node.", "{0.tag}"); 
90}
91
92/* {0} on a way, should be a relation; see #10252 */
93way[route=bus] {
94  throwWarning: tr("{0} on a way. Should be used in a relation", "{0.tag}"); 
95}
96
97/* see ticket:#10125 */
98node[source:geometry] {
99  throwWarning: tr("{0} on a node", "{0.key}");
100  fixChangeKey: "source:geometry => source:position";
101}
102
103/* Building inside building (spatial test) */
104*[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] 
105*[building][building!~/no|entrance/] {
106  throwWarning: tr("Building inside building");
107}
108
109/* Overlapping areas (spatial test) */
110area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] {
111  set water_area;
112}
113
114/* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */
115area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/]  area:closed:areaStyle.water_area,
116area:closed:areaStyle[landuse=reservoir]                         area:closed:areaStyle.water_area {
117  throwWarning: tr("Overlapping Water Areas");
118}
119
120area:closed:areaStyle  area:closed:areaStyle {
121  throwOther: tr("Overlapping Areas");
122}
123
124/* see ticket #9311 */
125node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/]  *[amenity=parking] {
126  throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
127}
128
129/* see ticket #9556 */
130area:closed:areaStyle[tag("natural") = parent_tag("natural")]  area:closed:areaStyle[natural] {
131  throwWarning: tr("Overlapping Identical Natural Areas");
132}
133
134area:closed:areaStyle[tag("landuse") = parent_tag("landuse")]  area:closed:areaStyle[landuse] {
135  throwWarning: tr("Overlapping Identical Landuses");
136}
137
138/* see ticket:#9522 */
139node[tag("amenity") = parent_tag("amenity")]  *[amenity][amenity != parking] {
140  throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity")));
141}
142node[tag("leisure") = parent_tag("leisure")]  *[leisure] {
143  throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure")));
144}
145node[tag("tourism") = parent_tag("tourism")]  *[tourism] {
146  throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism")));
147}
148node[tag("shop") = parent_tag("shop")]  *[shop] {
149  throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop")));
150}
151node[tag("power") = parent_tag("power")]  *[power] {
152  throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
153}
154
155/* isolated nodes which should be part of a way, see #10825 */
156node:unconnected:in-downloaded-area[entrance],
157node:unconnected:in-downloaded-area[traffic_calming],
158node:unconnected:in-downloaded-area[highway=passing_place],
159node:unconnected:in-downloaded-area[highway=mini_roundabout],
160node:unconnected:in-downloaded-area[highway=motorway_junction],
161node:unconnected:in-downloaded-area[highway=turning_loop],
162node:unconnected:in-downloaded-area[highway=turning_circle],
163node:unconnected:in-downloaded-area[highway=stop],
164node:unconnected:in-downloaded-area[highway=give_way],
165node:unconnected:in-downloaded-area[highway=traffic_signals],
166node:unconnected:in-downloaded-area[highway=crossing],
167node:unconnected:in-downloaded-area[crossing],
168node:unconnected:in-downloaded-area[railway=crossing],
169node:unconnected:in-downloaded-area[railway=level_crossing],
170node:unconnected:in-downloaded-area[railway=buffer_stop],
171node:unconnected:in-downloaded-area[public_transport=stop_position],
172node:unconnected:in-downloaded-area[noexit],
173node:unconnected:in-downloaded-area[waterway=dam],
174node:unconnected:in-downloaded-area[waterway=weir],
175node:unconnected:in-downloaded-area[waterway=waterfall],
176node:unconnected:in-downloaded-area[amenity=ferry_terminal],
177node:unconnected:in-downloaded-area[mountain_pass=yes],
178node:unconnected:in-downloaded-area[barrier=gate],
179node:unconnected:in-downloaded-area[barrier=lift_gate],
180node:unconnected:in-downloaded-area[barrier=swing_gate],
181node:unconnected:in-downloaded-area[barrier=toll_booth],
182node:unconnected:in-downloaded-area[barrier=turnstile],
183node:unconnected:in-downloaded-area[barrier=full-height_turnstile],
184node:unconnected:in-downloaded-area[barrier=motorcycle_barrier],
185node:unconnected:in-downloaded-area[barrier=rope],
186node:unconnected:in-downloaded-area[barrier=sally_port],
187node:unconnected:in-downloaded-area[barrier=spikes],
188node:unconnected:in-downloaded-area[barrier=stile],
189node:unconnected:in-downloaded-area[barrier=sump_buster],
190node:unconnected:in-downloaded-area[barrier=kerb],
191node:unconnected:in-downloaded-area[barrier=border_control],
192node:unconnected:in-downloaded-area[barrier=bump_gate],
193node:unconnected:in-downloaded-area[barrier=bus_trap],
194node:unconnected:in-downloaded-area[barrier=cattle_grid],
195node:unconnected:in-downloaded-area[barrier=chain],
196node:unconnected:in-downloaded-area[barrier=cycle_barrier],
197node:unconnected:in-downloaded-area[barrier=hampshire_gate],
198node:unconnected:in-downloaded-area[barrier=height_restrictor],
199node:unconnected:in-downloaded-area[barrier=debris] {
200  throwWarning: tr("{0} must be connected to a way", "{2.tag}");
201}
202
203/*see #11127*/
204way[railway][bridge] > node,
205way[highway][bridge] > node {
206  set node_in_bridge;
207}
208way[waterway] > node.node_in_bridge {
209  throwWarning: tr("node connects waterway and bridge");
210}
Note: See TracBrowser for help on using the repository browser.