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

Last change on this file since 16708 was 16255, checked in by Klumbumbus, 4 years ago

fix #19066 - Improve some validator messages

  • Property svn:eol-style set to native
File size: 2.0 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=route][!route],
12relation[type=route_master][!route_master],
13relation[type=boundary][!boundary][!disused:boundary],
14relation[type=public_transport][!public_transport],
15relation[type=waterway][!waterway],
16relation[type=enforcement][!enforcement] {
17 throwWarning: tr("{0} relation without {0} tag", "{1.key}");
18 group: tr("missing tag");
19 assertMatch: "relation type=route";
20 assertNoMatch: "relation type=route route=train";
21 assertMatch: "relation type=route_master";
22 assertNoMatch: "relation type=route_master route_master=train";
23 assertMatch: "relation type=boundary";
24 assertNoMatch: "relation type=boundary boundary=administrative";
25 assertNoMatch: "relation type=site site=administrative";
26 assertMatch: "relation type=public_transport";
27 assertNoMatch: "relation type=public_transport public_transport=stop_area";
28 assertMatch: "relation type=waterway";
29 assertNoMatch: "relation type=waterway waterway=river";
30 assertMatch: "relation type=enforcement";
31 assertNoMatch: "relation type=enforcement enforcement=maxspeed";
32}
33
34/* #11586 */
35relation[type=restriction][!/^restriction/]{
36 throwWarning: tr("{0} relation without {0} tag", "restriction");
37 group: tr("missing tag");
38 assertMatch: "relation type=restriction";
39 assertNoMatch: "relation type=restriction restriction=no_left_turn";
40 assertNoMatch: "relation type=restriction restriction:hgv=no_left_turn";
41}
42
43/* #15208, #16242 */
44relation[type=route][route=mtb ] > way[bicycle=no],
45relation[type=route][route=bicycle] > way[bicycle=no],
46relation[type=route][route=mtb ] > way[bicycle=use_sidepath],
47relation[type=route][route=bicycle] > way[bicycle=use_sidepath] {
48 throwWarning: tr("way with {0} is part of a bicycle route relation", "{0.tag}");
49}
Note: See TracBrowser for help on using the repository browser.