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

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

fix #10716 - add 'sidewalk' to appropriate highway presets; add validator warning for sidewalk=*on nodes and sidewalk=yes.

File size: 2.9 KB
Line 
1/* {0} on a node */
2node[oneway],
3node[bridge?],
4node[landuse],
5node[sidewalk],
6node[source:outline] {
7 throwWarning: tr("{0} on a node", "{0.key}");
8 assertMatch: "node oneway=-1";
9 assertNoMatch: "way oneway=-1";
10 assertMatch: "node bridge=yes";
11 assertNoMatch: "node bridge=13";
12}
13
14node[natural=wood] {
15 throwOther: tr("{0} on a node. Should be drawn as an area", "{0.tag}");
16}
17
18/* see ticket:#10125 */
19node[source:geometry] {
20 throwWarning: tr("{0} on a node", "{0.key}");
21 fixChangeKey: "source:geometry => source:position";
22}
23
24/* Building inside building (spatial test) */
25*[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")]
26*[building][building!~/no|entrance/] {
27 throwWarning: tr("Building inside building");
28}
29
30/* Overlapping areas (spatial test) */
31area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] {
32 set water_area;
33}
34
35/* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */
36area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/] area:closed:areaStyle.water_area,
37area:closed:areaStyle[landuse=reservoir] area:closed:areaStyle.water_area {
38 throwWarning: tr("Overlapping Water Areas");
39}
40
41area:closed:areaStyle area:closed:areaStyle {
42 throwOther: tr("Overlapping Areas");
43}
44
45/* see ticket #9311 */
46node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] *[amenity=parking] {
47 throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
48}
49
50/* see ticket #9556 */
51area:closed:areaStyle[tag("natural") = parent_tag("natural")] area:closed:areaStyle[natural] {
52 throwWarning: tr("Overlapping Identical Natural Areas");
53}
54
55area:closed:areaStyle[tag("landuse") = parent_tag("landuse")] area:closed:areaStyle[landuse] {
56 throwWarning: tr("Overlapping Identical Landuses");
57}
58
59/* see ticket:#9522 */
60node[tag("amenity") = parent_tag("amenity")] *[amenity][amenity != parking] {
61 throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity")));
62}
63node[tag("leisure") = parent_tag("leisure")] *[leisure] {
64 throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure")));
65}
66node[tag("tourism") = parent_tag("tourism")] *[tourism] {
67 throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism")));
68}
69node[tag("shop") = parent_tag("shop")] *[shop] {
70 throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop")));
71}
72node[tag("power") = parent_tag("power")] *[power] {
73 throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
74}
75
76/* see #10252 */
77way[route=bus] {
78 throwWarning: tr("{0} on a way. Should be used in a relation", "{0.tag}");
79}
80node[route] {
81 throwWarning: tr("{0}=* on a node. Should be used in a relation", "{0.key}");
82}
Note: See TracBrowser for help on using the repository browser.