[7281] | 1 | way[highway=~/^(motorway|trunk|primary|secondary|tertiary)$/] {
|
---|
[6601] | 2 | set major_road;
|
---|
| 3 | }
|
---|
[7281] | 4 | way[highway=~/^.*_link$/] {
|
---|
| 5 | set link_road;
|
---|
| 6 | }
|
---|
[6601] | 7 | way[highway=~/^(unclassified|residential|living_street|service)$/] {
|
---|
| 8 | set minor_road;
|
---|
| 9 | }
|
---|
| 10 |
|
---|
[6874] | 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)[.]?$/] {
|
---|
[6513] | 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 |
|
---|
[7926] | 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] {
|
---|
[6513] | 20 | throwWarning: tr("wrong highway tag on a node");
|
---|
| 21 | assertMatch: "node highway=primary";
|
---|
| 22 | assertMatch: "node highway=primary_link";
|
---|
[6516] | 23 | assertNoMatch: "node highway=traffic_calming";
|
---|
| 24 | assertNoMatch: "node highway=bus_stop";
|
---|
[6513] | 25 | assertNoMatch: "node highway=crossing";
|
---|
[6516] | 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";
|
---|
[6513] | 38 | }
|
---|
| 39 |
|
---|
| 40 | way[highway=crossing], way[railway=crossing] {
|
---|
| 41 | throwWarning: tr("wrong crossing tag on a way");
|
---|
| 42 | assertMatch: "way highway=crossing";
|
---|
| 43 | assertNoMatch: "node highway=crossing";
|
---|
| 44 | }
|
---|
| 45 |
|
---|
[7932] | 46 | way[highway=unclassified][!name][noname!=yes] {
|
---|
[6513] | 47 | throwOther: tr("Unnamed unclassified highway");
|
---|
| 48 | assertMatch: "way highway=unclassified";
|
---|
[7932] | 49 | assertNoMatch: "way highway=unclassified noname=yes";
|
---|
[6513] | 50 | assertNoMatch: "way highway=unclassified name=Foo";
|
---|
| 51 | }
|
---|
| 52 |
|
---|
[6601] | 53 | way.major_road[!ref] {
|
---|
[6513] | 54 | throwOther: tr("highway without a reference");
|
---|
| 55 | assertMatch: "way highway=primary";
|
---|
| 56 | assertNoMatch: "way highway=primary ref=123";
|
---|
| 57 | }
|
---|
| 58 |
|
---|
| 59 | way[highway=road] {
|
---|
| 60 | throwWarning: tr("temporary highway type");
|
---|
| 61 | assertMatch: "way highway=road";
|
---|
| 62 | assertNoMatch: "way highway=residential";
|
---|
| 63 | }
|
---|
| 64 |
|
---|
[6550] | 65 | way[highway=footway][maxspeed],
|
---|
| 66 | way[highway=steps][maxspeed],
|
---|
[7819] | 67 | way[highway=cycleway][bicycle=no],
|
---|
| 68 | way[highway=footway][foot=no],
|
---|
[6550] | 69 | way[highway=cycleway][cycleway=lane] {
|
---|
| 70 | throwWarning: tr("{0} used with {1}", "{0.value}", "{1.tag}");
|
---|
[6513] | 71 | assertNoMatch: "way highway=cycleway bicycle=yes";
|
---|
| 72 | assertNoMatch: "way highway=cycleway";
|
---|
| 73 | assertNoMatch: "way highway=footway foot=yes";
|
---|
| 74 | assertNoMatch: "way highway=footway";
|
---|
| 75 | assertMatch: "way highway=cycleway cycleway=lane";
|
---|
| 76 | assertNoMatch: "way highway=cycleway";
|
---|
| 77 | assertNoMatch: "way highway=residential cycleway=lane";
|
---|
| 78 | assertMatch: "way highway=footway maxspeed=20";
|
---|
| 79 | assertNoMatch: "way highway=residential maxspeed=20";
|
---|
| 80 | assertNoMatch: "way highway=footway";
|
---|
| 81 | }
|
---|
| 82 |
|
---|
| 83 | *[name =~ /(?i).*Strasse.*/] {
|
---|
[6637] | 84 | throwOther: tr("street name contains ss");
|
---|
[6513] | 85 | assertMatch: "way name=Foobarstrasse";
|
---|
| 86 | assertMatch: "way name=Foobar-Strassenweg";
|
---|
| 87 | assertNoMatch: "way name=Foobarstraße";
|
---|
| 88 | }
|
---|
[7814] | 89 |
|
---|
| 90 | /* footway, see #10851 */
|
---|
| 91 | way[footway=left],
|
---|
| 92 | way[footway=right],
|
---|
| 93 | way[footway=both],
|
---|
| 94 | way[footway=no] {
|
---|
| 95 | throwWarning: tr("{0} is deprecated", "{0.tag}");
|
---|
| 96 | suggestAlternative: "sidewalk";
|
---|
| 97 | fixChangeKey: "footway => sidewalk";
|
---|
| 98 | set footway_to_sidewalk;
|
---|
| 99 | }
|
---|
| 100 | way[footway=none] {
|
---|
| 101 | throwWarning: tr("{0} is deprecated", "{0.tag}");
|
---|
| 102 | suggestAlternative: "sidewalk=no";
|
---|
| 103 | fixRemove: "footway";
|
---|
| 104 | fixAdd: "sidewalk=no";
|
---|
| 105 | set footway_to_sidewalk;
|
---|
| 106 | }
|
---|
| 107 | way[footway][footway!=sidewalk][footway!=crossing]!.footway_to_sidewalk { /* do not trigger this rule if already one of the two previous rules applied */
|
---|
| 108 | 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");
|
---|
| 109 | }
|
---|