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

Last change on this file since 8139 was 8139, checked in by Klumbumbus, 9 years ago

see #10837 - improve building:part preset

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