source: josm/trunk/data/validator/relation.mapcss @ 6537

Last change on this file since 6537 was 6537, checked in by simon04, 8 years ago

see #9414 - migrate relation and religion tagchecks to MapCSS, add more "X relation without tag X" checks

File size: 1.9 KB
Line 
1/* relation types */
2
3relation[!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 */
10relation[type=route][!route] {
11  throwWarning: tr("{0} relation without {0} tag", "route");
12  assertMatch: "relation type=route";
13  assertNoMatch: "relation type=route route=train";
14}
15
16relation[type=route_master][!route_master] {
17  /* see #9071 */
18  throwWarning: tr("{0} relation without {0} tag", "route_master");
19  assertMatch: "relation type=route_master";
20  assertNoMatch: "relation type=route_master route_master=train";
21}
22
23relation[type=restriction][!restriction] {
24  throwWarning: tr("{0} relation without {0} tag", "restriction");
25  assertMatch: "relation type=restriction";
26  assertNoMatch: "relation type=restriction restriction=no_left_turn";
27}
28
29relation[type=boundary][!boundary] {
30  throwWarning: tr("{0} relation without {0} tag", "boundary");
31  assertMatch: "relation type=boundary";
32  assertNoMatch: "relation type=boundary boundary=administrative";
33}
34
35relation[type=site][!site] {
36  throwWarning: tr("{0} relation without {0} tag", "site");
37  assertMatch: "relation type=site";
38  assertNoMatch: "relation type=site site=administrative";
39}
40
41relation[type=public_transport][!public_transport] {
42  throwWarning: tr("{0} relation without {0} tag", "public_transport");
43  assertMatch: "relation type=public_transport";
44  assertNoMatch: "relation type=public_transport public_transport=stop_area";
45}
46
47relation[type=waterway][!waterway] {
48  throwWarning: tr("{0} relation without {0} tag", "waterway");
49  assertMatch: "relation type=waterway";
50  assertNoMatch: "relation type=waterway waterway=river";
51}
52
53relation[type=enforcement][!enforcement] {
54  throwWarning: tr("{0} relation without {0} tag", "enforcement");
55  assertMatch: "relation type=enforcement";
56  assertNoMatch: "relation type=enforcement enforcement=maxspeed";
57}
Note: See TracBrowser for help on using the repository browser.