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

Last change on this file since 7937 was 7937, checked in by bastiK, 10 years ago

add subversion property svn:eol=native

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