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

Last change on this file since 6790 was 6790, checked in by Don-vip, 6 years ago

fix #9651 - Validade landuse=* on nodes

File size: 2.3 KB
RevLine 
[6550]1/* {0} on a node */
2node[oneway],
3node[bridge?],
[6790]4node[landuse],
[6550]5node[source:geometry],
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";
[6611]12}
13
14/* Building inside building (spatial test) */
15*[building!~/no|entrance/][coalesce(tag("layer"),"0") = coalesce(parent_tag("layer"),"0")] 
16*[building!~/no|entrance/] {
17  throwWarning: tr("Building inside building");
[6613]18}
19
20/* Overlapping areas (spatial test) */
21area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] {
22  set water_area;
23}
24
[6630]25area:closed:areaStyle.water_area  area:closed:areaStyle.water_area {
[6613]26  throwWarning: tr("Overlapping Water Areas");
27}
28
[6630]29area:closed:areaStyle  area:closed:areaStyle {
[6613]30  throwOther: tr("Overlapping Areas");
31}
[6614]32
33/* see ticket #9311 */
[6719]34node[amenity=parking][!"capacity:disabled"]  *[amenity=parking],
[6628]35node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/]  *[amenity=parking] {
[6614]36  throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
[6680]37}
38
39/* see ticket #9556 */
40area:closed:areaStyle[tag("natural") = parent_tag("natural")]  area:closed:areaStyle[natural] {
41  throwWarning: tr("Overlapping Identical Natural Areas");
42}
43
44area:closed:areaStyle[tag("landuse") = parent_tag("landuse")]  area:closed:areaStyle[landuse] {
45  throwWarning: tr("Overlapping Identical Landuses");
[6719]46}
47
48/* see ticket:#9522 */
49node[tag("amenity") = parent_tag("amenity")]  *[amenity][amenity != parking] {
50  throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity")));
51}
52node[tag("leisure") = parent_tag("leisure")]  *[leisure] {
53  throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure")));
54}
55node[tag("tourism") = parent_tag("tourism")]  *[tourism] {
56  throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism")));
57}
58node[tag("shop") = parent_tag("shop")]  *[shop] {
59  throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop")));
[6759]60}
61node[tag("power") = parent_tag("power")]  *[power] {
62  throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
63}
Note: See TracBrowser for help on using the repository browser.