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

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

fix #11241 - add man_made=cutline (preset, mappaint, validator); syntax fix (missing comma)

  • Property svn:eol-style set to native
File size: 6.6 KB
RevLine 
[7735]1/* {0} on a node, should be a way */
[6550]2node[oneway],
[7960]3node[bridge],
[7707]4node[sidewalk],
[7814]5node[footway],
[7960]6node[man_made=embankment],
[7975]7node[man_made=groyne],
[8147]8node[man_made=cutline],
9node[cutline],
[7915]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],
[7977]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],
[7737]32node[waterway=river],
33node[waterway=canal],
34node[waterway=stream],
35node[waterway=ditch],
[7975]36node[waterway=drain],
[7735]37node[natural=coastline],
38node[natural=ridge],
[8135]39node[natural=valley],
[7735]40node[natural=tree_row] {
[7942]41  throwWarning: tr("{0} on a node. Should be used on a way.", "{0.tag}");
[6550]42  assertMatch: "node oneway=-1";
43  assertNoMatch: "way oneway=-1";
44  assertMatch: "node bridge=yes";
[7963]45  assertMatch: "node bridge=viaduct";
[6611]46}
47
[7735]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[waterway=riverbank],
[7960]64node[man_made=bridge],
[7975]65node[man_made=breakwater],
[7977]66node[aeroway=apron],
[7967]67node[power=plant],
[8139]68node[building:part],
[7735]69node[source:outline] {
70  throwWarning: tr("{0} on a node. Should be drawn as an area.", "{0.tag}");
[7468]71}
72
[7744]73/* {0} on a node, should be a relation; see #10252, #10769 */
74node[route],
75node[restriction] {
76  throwWarning: tr("{0}=* on a node. Should be used in a relation", "{0.key}"); 
77}
78
[7942]79/* {0} on a way, should be a node */
[7960]80way[entrance],
81way[man_made=survey_point],
[7967]82way[power=pole],
[7977]83way[amenity=vending_machine],
[7942]84way[natural=peak],
85way[natural=saddle],
86way[natural=volcano],
87way[natural=tree] {
88  throwWarning: tr("{0} on a way. Should be used on a node.", "{0.tag}"); 
89}
90
[7744]91/* {0} on a way, should be a relation; see #10252 */
92way[route=bus] {
93  throwWarning: tr("{0} on a way. Should be used in a relation", "{0.tag}"); 
94}
95
[7279]96/* see ticket:#10125 */
97node[source:geometry] {
98  throwWarning: tr("{0} on a node", "{0.key}");
99  fixChangeKey: "source:geometry => source:position";
100}
101
[6611]102/* Building inside building (spatial test) */
[7164]103*[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] 
[6861]104*[building][building!~/no|entrance/] {
[6611]105  throwWarning: tr("Building inside building");
[6613]106}
107
108/* Overlapping areas (spatial test) */
109area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] {
110  set water_area;
111}
112
[7280]113/* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */
114area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/]  area:closed:areaStyle.water_area,
115area:closed:areaStyle[landuse=reservoir]                         area:closed:areaStyle.water_area {
[6613]116  throwWarning: tr("Overlapping Water Areas");
117}
118
[6630]119area:closed:areaStyle  area:closed:areaStyle {
[6613]120  throwOther: tr("Overlapping Areas");
121}
[6614]122
123/* see ticket #9311 */
[6628]124node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/]  *[amenity=parking] {
[6614]125  throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
[6680]126}
127
128/* see ticket #9556 */
129area:closed:areaStyle[tag("natural") = parent_tag("natural")]  area:closed:areaStyle[natural] {
130  throwWarning: tr("Overlapping Identical Natural Areas");
131}
132
133area:closed:areaStyle[tag("landuse") = parent_tag("landuse")]  area:closed:areaStyle[landuse] {
134  throwWarning: tr("Overlapping Identical Landuses");
[6719]135}
136
137/* see ticket:#9522 */
138node[tag("amenity") = parent_tag("amenity")]  *[amenity][amenity != parking] {
139  throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity")));
140}
141node[tag("leisure") = parent_tag("leisure")]  *[leisure] {
142  throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure")));
143}
144node[tag("tourism") = parent_tag("tourism")]  *[tourism] {
145  throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism")));
146}
147node[tag("shop") = parent_tag("shop")]  *[shop] {
148  throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop")));
[6759]149}
150node[tag("power") = parent_tag("power")]  *[power] {
151  throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
[7793]152}
153
[7807]154/* isolated nodes which should be part of a way, see #10825 */
[7793]155node:unconnected[entrance],
156node:unconnected[traffic_calming],
157node:unconnected[highway=passing_place],
158node:unconnected[highway=mini_roundabout],
159node:unconnected[highway=motorway_junction],
160node:unconnected[highway=turning_loop],
161node:unconnected[highway=turning_circle],
[7807]162node:unconnected[highway=stop],
163node:unconnected[highway=give_way],
[7793]164node:unconnected[highway=traffic_signals],
165node:unconnected[highway=crossing],
166node:unconnected[crossing],
167node:unconnected[railway=crossing],
168node:unconnected[railway=level_crossing],
169node:unconnected[railway=buffer_stop],
[7807]170node:unconnected[public_transport=stop_position],
[7793]171node:unconnected[noexit],
172node:unconnected[waterway=dam],
173node:unconnected[waterway=weir],
174node:unconnected[waterway=waterfall],
175node:unconnected[amenity=ferry_terminal],
[7807]176node:unconnected[mountain_pass=yes],
177node:unconnected[barrier=gate],
178node:unconnected[barrier=lift_gate],
179node:unconnected[barrier=swing_gate],
180node:unconnected[barrier=toll_booth],
181node:unconnected[barrier=turnstile],
182node:unconnected[barrier=full-height_turnstile],
183node:unconnected[barrier=motorcycle_barrier],
184node:unconnected[barrier=rope],
185node:unconnected[barrier=sally_port],
186node:unconnected[barrier=spikes],
187node:unconnected[barrier=stile],
188node:unconnected[barrier=sump_buster],
189node:unconnected[barrier=kerb],
190node:unconnected[barrier=border_control],
191node:unconnected[barrier=bump_gate],
192node:unconnected[barrier=bus_trap],
193node:unconnected[barrier=cattle_grid],
194node:unconnected[barrier=chain],
195node:unconnected[barrier=cycle_barrier],
196node:unconnected[barrier=hampshire_gate],
197node:unconnected[barrier=height_restrictor],
198node:unconnected[barrier=debris] {
[7793]199  throwWarning: tr("{0} must be connected to a way", "{1.tag}");
[8089]200}
201
202/*see #11127*/
203way[railway][bridge] > node,
204way[highway][bridge] > node {
205  set node_in_bridge;
206}
207way[waterway] > node.node_in_bridge {
208  throwWarning: tr("node connects waterway and bridge");
[7645]209}
Note: See TracBrowser for help on using the repository browser.