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

Last change on this file since 7724 was 7707, checked in by Klumbumbus, 11 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
RevLine 
[6550]1/* {0} on a node */
2node[oneway],
3node[bridge?],
[6790]4node[landuse],
[7707]5node[sidewalk],
[6550]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
[7468]14node[natural=wood] {
15 throwOther: tr("{0} on a node. Should be drawn as an area", "{0.tag}");
16}
17
[7279]18/* see ticket:#10125 */
19node[source:geometry] {
20 throwWarning: tr("{0} on a node", "{0.key}");
21 fixChangeKey: "source:geometry => source:position";
22}
23
[6611]24/* Building inside building (spatial test) */
[7164]25*[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")]
[6861]26*[building][building!~/no|entrance/] {
[6611]27 throwWarning: tr("Building inside building");
[6613]28}
29
30/* Overlapping areas (spatial test) */
31area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] {
32 set water_area;
33}
34
[7280]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 {
[6613]38 throwWarning: tr("Overlapping Water Areas");
39}
40
[6630]41area:closed:areaStyle area:closed:areaStyle {
[6613]42 throwOther: tr("Overlapping Areas");
43}
[6614]44
45/* see ticket #9311 */
[6628]46node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] *[amenity=parking] {
[6614]47 throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
[6680]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");
[6719]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")));
[6759]71}
72node[tag("power") = parent_tag("power")] *[power] {
73 throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
74}
[7645]75
[7651]76/* see #10252 */
[7645]77way[route=bus] {
78 throwWarning: tr("{0} on a way. Should be used in a relation", "{0.tag}");
[7651]79}
80node[route] {
81 throwWarning: tr("{0}=* on a node. Should be used in a relation", "{0.key}");
[7645]82}
Note: See TracBrowser for help on using the repository browser.