1 | way[highway=~/^(motorway|trunk|primary|secondary|tertiary)$/] {
|
---|
2 | set major_road;
|
---|
3 | }
|
---|
4 | way[highway=~/^.*_link$/] {
|
---|
5 | set link_road;
|
---|
6 | }
|
---|
7 | way[highway=~/^(unclassified|residential|living_street|service)$/] {
|
---|
8 | set minor_road;
|
---|
9 | }
|
---|
10 |
|
---|
11 | way[highway][name =~ /(?i).* (Ave|Blvd|Br|Brg|Cct|Cir|Cl|Cr|Crct|Cres|Crt|Ct|Dr|Drv|Esp|Espl|Hwy|Ln|Mw|Mwy|Pky|Pkwy|Pl|Rd|Qy|Qys|Sq|St|Str|Ter|Tce|Tr|Wy)[.]?$/] {
|
---|
12 | throwWarning: tr("abbreviated street name");
|
---|
13 | assertMatch: "way highway=unclassified name=\"Foo Ave\"";
|
---|
14 | assertMatch: "way highway=unclassified name=\"Foo Ave.\"";
|
---|
15 | assertMatch: "way highway=unclassified name=\"Bou Blvd.\"";
|
---|
16 | assertMatch: "way highway=unclassified name=\"Bou blvd.\"";
|
---|
17 | }
|
---|
18 |
|
---|
19 | node[highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service|living_street|pedestrian|track|path|footway|cycleway|bus_guideway|bridleway/][highway!=motorway_junction][highway!=services] {
|
---|
20 | throwWarning: tr("wrong highway tag on a node");
|
---|
21 | assertMatch: "node highway=primary";
|
---|
22 | assertMatch: "node highway=primary_link";
|
---|
23 | assertNoMatch: "node highway=traffic_calming";
|
---|
24 | assertNoMatch: "node highway=bus_stop";
|
---|
25 | assertNoMatch: "node highway=crossing";
|
---|
26 | assertNoMatch: "node highway=emergency_access_point";
|
---|
27 | assertNoMatch: "node highway=give_way";
|
---|
28 | assertNoMatch: "node highway=mini_roundabout";
|
---|
29 | assertNoMatch: "node highway=motorway_junction";
|
---|
30 | assertNoMatch: "node highway=passing_place";
|
---|
31 | assertNoMatch: "node highway=rest_area";
|
---|
32 | assertNoMatch: "node highway=speed_camera";
|
---|
33 | assertNoMatch: "node highway=street_lamp";
|
---|
34 | assertNoMatch: "node highway=services";
|
---|
35 | assertNoMatch: "node highway=stop";
|
---|
36 | assertNoMatch: "node highway=traffic_signals";
|
---|
37 | assertNoMatch: "node highway=turning_circle";
|
---|
38 | }
|
---|
39 |
|
---|
40 | way[highway=crossing],
|
---|
41 | way[railway=crossing],
|
---|
42 | way[railway=level_crossing] {
|
---|
43 | throwWarning: tr("wrong crossing tag on a way");
|
---|
44 | assertMatch: "way highway=crossing";
|
---|
45 | assertNoMatch: "node highway=crossing";
|
---|
46 | }
|
---|
47 |
|
---|
48 | way[highway=unclassified][!name][noname!=yes] {
|
---|
49 | throwOther: tr("Unnamed unclassified highway");
|
---|
50 | assertMatch: "way highway=unclassified";
|
---|
51 | assertNoMatch: "way highway=unclassified noname=yes";
|
---|
52 | assertNoMatch: "way highway=unclassified name=Foo";
|
---|
53 | }
|
---|
54 |
|
---|
55 | way.major_road[!ref] {
|
---|
56 | throwOther: tr("highway without a reference");
|
---|
57 | assertMatch: "way highway=primary";
|
---|
58 | assertNoMatch: "way highway=primary ref=123";
|
---|
59 | }
|
---|
60 |
|
---|
61 | way[highway=road] {
|
---|
62 | throwWarning: tr("temporary highway type");
|
---|
63 | assertMatch: "way highway=road";
|
---|
64 | assertNoMatch: "way highway=residential";
|
---|
65 | }
|
---|
66 |
|
---|
67 | way[highway=footway][maxspeed],
|
---|
68 | way[highway=steps][maxspeed],
|
---|
69 | way[highway=cycleway][bicycle=no],
|
---|
70 | way[highway=footway][foot=no],
|
---|
71 | way[highway=cycleway][cycleway=lane] {
|
---|
72 | throwWarning: tr("{0} used with {1}", "{0.value}", "{1.tag}");
|
---|
73 | assertNoMatch: "way highway=cycleway bicycle=yes";
|
---|
74 | assertNoMatch: "way highway=cycleway";
|
---|
75 | assertNoMatch: "way highway=footway foot=yes";
|
---|
76 | assertNoMatch: "way highway=footway";
|
---|
77 | assertMatch: "way highway=cycleway cycleway=lane";
|
---|
78 | assertNoMatch: "way highway=cycleway";
|
---|
79 | assertNoMatch: "way highway=residential cycleway=lane";
|
---|
80 | assertMatch: "way highway=footway maxspeed=20";
|
---|
81 | assertNoMatch: "way highway=residential maxspeed=20";
|
---|
82 | assertNoMatch: "way highway=footway";
|
---|
83 | }
|
---|
84 |
|
---|
85 | *[name =~ /(?i).*Strasse.*/] {
|
---|
86 | throwOther: tr("street name contains ss");
|
---|
87 | assertMatch: "way name=Foobarstrasse";
|
---|
88 | assertMatch: "way name=Foobar-Strassenweg";
|
---|
89 | assertNoMatch: "way name=Foobarstraße";
|
---|
90 | }
|
---|
91 |
|
---|
92 | /* footway, see #10851 */
|
---|
93 | way[footway=left],
|
---|
94 | way[footway=right],
|
---|
95 | way[footway=both],
|
---|
96 | way[footway=no] {
|
---|
97 | throwWarning: tr("{0} is deprecated", "{0.tag}");
|
---|
98 | suggestAlternative: "sidewalk";
|
---|
99 | fixChangeKey: "footway => sidewalk";
|
---|
100 | set footway_to_sidewalk;
|
---|
101 | }
|
---|
102 | way[footway=none] {
|
---|
103 | throwWarning: tr("{0} is deprecated", "{0.tag}");
|
---|
104 | suggestAlternative: "sidewalk=no";
|
---|
105 | fixRemove: "footway";
|
---|
106 | fixAdd: "sidewalk=no";
|
---|
107 | set footway_to_sidewalk;
|
---|
108 | }
|
---|
109 | way[footway][footway!=sidewalk][footway!=crossing]!.footway_to_sidewalk { /* do not trigger this rule if already one of the two previous rules applied */
|
---|
110 | throwWarning: tr("Value of ''{0}'' should either be ''{1}'' or ''{2}''. For sidewalks use ''{3}'' instead.", "{0.key}", "{1.value}", "{2.value}", "sidewalk=left|right|both|no");
|
---|
111 | }
|
---|