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

Last change on this file since 7279 was 7279, checked in by simon04, 11 years ago

fix #10125 - Validator: fix source:geometry to source:position on nodes

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