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

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

fix #10825 - add some more values for isolated nodes test, remove barrier=entrance because there is already a more advanced test

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