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

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

see #10835 - icon unification and geometry consistency for some transport related tags (railway, aeroway,...). add validator warnings

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