1 | /* relation types */ |
---|
2 | |
---|
3 | relation[!type] { |
---|
4 | throwError: tr("relation without type"); |
---|
5 | assertMatch: "relation name=Foo"; |
---|
6 | assertNoMatch: "relation type=route name=Foo"; |
---|
7 | } |
---|
8 | |
---|
9 | /* from http://wiki.openstreetmap.org/wiki/Types_of_relation */ |
---|
10 | /* see also #9071 */ |
---|
11 | relation[type=boundary][!boundary][!disused:boundary], |
---|
12 | relation[type=destination_sign][!destination], |
---|
13 | relation[type=enforcement][!enforcement], |
---|
14 | relation[type=public_transport][!public_transport], |
---|
15 | relation[type=route][!route], |
---|
16 | relation[type=route_master][!route_master], |
---|
17 | relation[type=waterway][!waterway] { |
---|
18 | throwWarning: tr("{0} relation without {0} tag", "{1.key}"); |
---|
19 | group: tr("missing tag"); |
---|
20 | assertMatch: "relation type=route"; |
---|
21 | assertNoMatch: "relation type=route route=train"; |
---|
22 | assertMatch: "relation type=route_master"; |
---|
23 | assertNoMatch: "relation type=route_master route_master=train"; |
---|
24 | assertMatch: "relation type=boundary"; |
---|
25 | assertNoMatch: "relation type=boundary boundary=administrative"; |
---|
26 | assertNoMatch: "relation type=site site=administrative"; |
---|
27 | assertMatch: "relation type=public_transport"; |
---|
28 | assertNoMatch: "relation type=public_transport public_transport=stop_area"; |
---|
29 | assertMatch: "relation type=waterway"; |
---|
30 | assertNoMatch: "relation type=waterway waterway=river"; |
---|
31 | assertMatch: "relation type=enforcement"; |
---|
32 | assertNoMatch: "relation type=enforcement enforcement=maxspeed"; |
---|
33 | } |
---|
34 | |
---|
35 | /* #11586 */ |
---|
36 | relation[type=restriction][!/^restriction/]{ |
---|
37 | throwWarning: tr("{0} relation without {0} tag", "restriction"); |
---|
38 | group: tr("missing tag"); |
---|
39 | assertMatch: "relation type=restriction"; |
---|
40 | assertNoMatch: "relation type=restriction restriction=no_left_turn"; |
---|
41 | assertNoMatch: "relation type=restriction restriction:hgv=no_left_turn"; |
---|
42 | } |
---|
43 | |
---|
44 | /* #15208, #16242 */ |
---|
45 | relation[type=route][route=mtb ] > way[bicycle=no], |
---|
46 | relation[type=route][route=bicycle] > way[bicycle=no], |
---|
47 | relation[type=route][route=mtb ] > way[bicycle=private], |
---|
48 | relation[type=route][route=bicycle] > way[bicycle=private], |
---|
49 | relation[type=route][route=mtb ] > way[bicycle=use_sidepath], |
---|
50 | relation[type=route][route=bicycle] > way[bicycle=use_sidepath], |
---|
51 | relation[type=route][route=fitness_trail] > way[foot=no], |
---|
52 | relation[type=route][route=hiking ] > way[foot=no], |
---|
53 | relation[type=route][route=running ] > way[foot=no], |
---|
54 | relation[type=route][route=walking ] > way[foot=no], |
---|
55 | relation[type=route][route=fitness_trail] > way[foot=private], |
---|
56 | relation[type=route][route=hiking ] > way[foot=private], |
---|
57 | relation[type=route][route=running ] > way[foot=private], |
---|
58 | relation[type=route][route=walking ] > way[foot=private], |
---|
59 | relation[type=route][route=fitness_trail] > way[foot=use_sidepath], |
---|
60 | relation[type=route][route=hiking ] > way[foot=use_sidepath], |
---|
61 | relation[type=route][route=running ] > way[foot=use_sidepath], |
---|
62 | relation[type=route][route=walking ] > way[foot=use_sidepath], |
---|
63 | relation[type=route][route=horse] > way[horse=no], |
---|
64 | relation[type=route][route=horse] > way[horse=private], |
---|
65 | relation[type=route][route=horse] > way[horse=use_sidepath] { |
---|
66 | throwWarning: tr("way with {0} is part of a {1} route relation", "{0.tag}", "{0.key}"); |
---|
67 | } |
---|
68 | |
---|
69 | /* #21285, #21738 */ |
---|
70 | relation[type=building][building] >[role=outline] *[building][parent_tag(building) != tag(building)] { |
---|
71 | throwWarning: tr("{0} of {1} member and {0} relation differ", "{0.key}", "outline"); |
---|
72 | group: tr("suspicious tag combination"); |
---|
73 | } |
---|