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

Last change on this file since 7735 was 7735, checked in by Klumbumbus, 8 years ago

see #10679 - drop support of some natural=* on nodes in presets and mappaint style. Add validator messages, change two icons in presets, add mappaint style for some natural=*.

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