File: relation.mapcss

package info (click to toggle)
josm 0.0.svn18646%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 216,968 kB
  • sloc: java: 389,442; xml: 199,920; perl: 10,155; jsp: 265; sh: 182; makefile: 114; javascript: 74; python: 29
file content (73 lines) | stat: -rw-r--r-- 3,367 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* relation types */

relation[!type] {
  throwError: tr("relation without type");
  assertMatch: "relation name=Foo";
  assertNoMatch: "relation type=route name=Foo";
}

/* from http://wiki.openstreetmap.org/wiki/Types_of_relation */
/* see also #9071 */
relation[type=boundary][!boundary][!disused:boundary],
relation[type=destination_sign][!destination],
relation[type=enforcement][!enforcement],
relation[type=public_transport][!public_transport],
relation[type=route][!route],
relation[type=route_master][!route_master],
relation[type=waterway][!waterway] {
  throwWarning: tr("{0} relation without {0} tag", "{1.key}");
  group: tr("missing tag");
  assertMatch: "relation type=route";
  assertNoMatch: "relation type=route route=train";
  assertMatch: "relation type=route_master";
  assertNoMatch: "relation type=route_master route_master=train";
  assertMatch: "relation type=boundary";
  assertNoMatch: "relation type=boundary boundary=administrative";
  assertNoMatch: "relation type=site site=administrative";
  assertMatch: "relation type=public_transport";
  assertNoMatch: "relation type=public_transport public_transport=stop_area";
  assertMatch: "relation type=waterway";
  assertNoMatch: "relation type=waterway waterway=river";
  assertMatch: "relation type=enforcement";
  assertNoMatch: "relation type=enforcement enforcement=maxspeed";
}

/* #11586 */
relation[type=restriction][!/^restriction/]{ 
  throwWarning: tr("{0} relation without {0} tag", "restriction");
  group: tr("missing tag");
  assertMatch: "relation type=restriction";
  assertNoMatch: "relation type=restriction restriction=no_left_turn";
  assertNoMatch: "relation type=restriction restriction:hgv=no_left_turn";
}

/* #15208, #16242 */
relation[type=route][route=mtb    ] > way[bicycle=no],
relation[type=route][route=bicycle] > way[bicycle=no],
relation[type=route][route=mtb    ] > way[bicycle=private],
relation[type=route][route=bicycle] > way[bicycle=private],
relation[type=route][route=mtb    ] > way[bicycle=use_sidepath],
relation[type=route][route=bicycle] > way[bicycle=use_sidepath], 
relation[type=route][route=fitness_trail] > way[foot=no],
relation[type=route][route=hiking       ] > way[foot=no],
relation[type=route][route=running      ] > way[foot=no],
relation[type=route][route=walking      ] > way[foot=no],
relation[type=route][route=fitness_trail] > way[foot=private],
relation[type=route][route=hiking       ] > way[foot=private],
relation[type=route][route=running      ] > way[foot=private],
relation[type=route][route=walking      ] > way[foot=private],
relation[type=route][route=fitness_trail] > way[foot=use_sidepath],
relation[type=route][route=hiking       ] > way[foot=use_sidepath],
relation[type=route][route=running      ] > way[foot=use_sidepath],
relation[type=route][route=walking      ] > way[foot=use_sidepath], 
relation[type=route][route=horse] > way[horse=no],
relation[type=route][route=horse] > way[horse=private],
relation[type=route][route=horse] > way[horse=use_sidepath] { 
  throwWarning: tr("way with {0} is part of a {1} route relation", "{0.tag}", "{0.key}");
}

/* #21285, #21738 */
relation[type=building][building] >[role=outline] *[building][parent_tag(building) != tag(building)] {
  throwWarning: tr("{0} of {1} member and {0} relation differ", "{0.key}", "outline");
  group: tr("suspicious tag combination");
}