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

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

fix #11223 - remove waterway=wadi and waterway=rapids, update natural=ridge, natural=valley and intermittent=yes

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