source: josm/trunk/resources/data/validator/relation.mapcss@ 18548

Last change on this file since 18548 was 18369, checked in by stoecker, 3 years ago

fix #21738, patch by skyper, add tag definition for members of type=building relations and update the valdator warning

  • Property svn:eol-style set to native
File size: 3.3 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 */
10/* see also #9071 */
11relation[type=boundary][!boundary][!disused:boundary],
12relation[type=destination_sign][!destination],
13relation[type=enforcement][!enforcement],
14relation[type=public_transport][!public_transport],
15relation[type=route][!route],
16relation[type=route_master][!route_master],
17relation[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 */
36relation[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 */
45relation[type=route][route=mtb ] > way[bicycle=no],
46relation[type=route][route=bicycle] > way[bicycle=no],
47relation[type=route][route=mtb ] > way[bicycle=private],
48relation[type=route][route=bicycle] > way[bicycle=private],
49relation[type=route][route=mtb ] > way[bicycle=use_sidepath],
50relation[type=route][route=bicycle] > way[bicycle=use_sidepath],
51relation[type=route][route=fitness_trail] > way[foot=no],
52relation[type=route][route=hiking ] > way[foot=no],
53relation[type=route][route=running ] > way[foot=no],
54relation[type=route][route=walking ] > way[foot=no],
55relation[type=route][route=fitness_trail] > way[foot=private],
56relation[type=route][route=hiking ] > way[foot=private],
57relation[type=route][route=running ] > way[foot=private],
58relation[type=route][route=walking ] > way[foot=private],
59relation[type=route][route=fitness_trail] > way[foot=use_sidepath],
60relation[type=route][route=hiking ] > way[foot=use_sidepath],
61relation[type=route][route=running ] > way[foot=use_sidepath],
62relation[type=route][route=walking ] > way[foot=use_sidepath],
63relation[type=route][route=horse] > way[horse=no],
64relation[type=route][route=horse] > way[horse=private],
65relation[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 */
70relation[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}
Note: See TracBrowser for help on using the repository browser.