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

Last change on this file since 6877 was 6861, checked in by simon04, 10 years ago

see #9593 - MapCSS: adapt MapCSS tests to negated regular expressions behaviour (see r6859)

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