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=building][!building], 13relation[type=destination_sign][!destination], 14relation[type=enforcement][!enforcement], 15relation[type=public_transport][!public_transport], 16relation[type=route][!route], 17relation[type=route_master][!route_master], 18relation[type=waterway][!waterway] { 19 throwWarning: tr("{0} relation without {0} tag", "{1.key}"); 20 group: tr("missing tag"); 21 assertMatch: "relation type=route"; 22 assertNoMatch: "relation type=route route=train"; 23 assertMatch: "relation type=route_master"; 24 assertNoMatch: "relation type=route_master route_master=train"; 25 assertMatch: "relation type=boundary"; 26 assertNoMatch: "relation type=boundary boundary=administrative"; 27 assertNoMatch: "relation type=site site=administrative"; 28 assertMatch: "relation type=public_transport"; 29 assertNoMatch: "relation type=public_transport public_transport=stop_area"; 30 assertMatch: "relation type=waterway"; 31 assertNoMatch: "relation type=waterway waterway=river"; 32 assertMatch: "relation type=enforcement"; 33 assertNoMatch: "relation type=enforcement enforcement=maxspeed"; 34} 35 36/* #11586 */ 37relation[type=restriction][!/^restriction/]{ 38 throwWarning: tr("{0} relation without {0} tag", "restriction"); 39 group: tr("missing tag"); 40 assertMatch: "relation type=restriction"; 41 assertNoMatch: "relation type=restriction restriction=no_left_turn"; 42 assertNoMatch: "relation type=restriction restriction:hgv=no_left_turn"; 43} 44 45/* #15208, #16242 */ 46relation[type=route][route=mtb ] > way[bicycle=no], 47relation[type=route][route=bicycle] > way[bicycle=no], 48relation[type=route][route=mtb ] > way[bicycle=private], 49relation[type=route][route=bicycle] > way[bicycle=private], 50relation[type=route][route=mtb ] > way[bicycle=use_sidepath], 51relation[type=route][route=bicycle] > way[bicycle=use_sidepath], 52relation[type=route][route=fitness_trail] > way[foot=no], 53relation[type=route][route=hiking ] > way[foot=no], 54relation[type=route][route=running ] > way[foot=no], 55relation[type=route][route=walking ] > way[foot=no], 56relation[type=route][route=fitness_trail] > way[foot=private], 57relation[type=route][route=hiking ] > way[foot=private], 58relation[type=route][route=running ] > way[foot=private], 59relation[type=route][route=walking ] > way[foot=private], 60relation[type=route][route=fitness_trail] > way[foot=use_sidepath], 61relation[type=route][route=hiking ] > way[foot=use_sidepath], 62relation[type=route][route=running ] > way[foot=use_sidepath], 63relation[type=route][route=walking ] > way[foot=use_sidepath], 64relation[type=route][route=horse] > way[horse=no], 65relation[type=route][route=horse] > way[horse=private], 66relation[type=route][route=horse] > way[horse=use_sidepath] { 67 throwWarning: tr("way with {0} is part of a {1} route relation", "{0.tag}", "{0.key}"); 68} 69