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

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

see #10835 - fix regression of r7960

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