| 1 | way[highway=~/^(motorway|trunk|primary|secondary|tertiary)(_link)?$/] {
|
|---|
| 2 | set major_road;
|
|---|
| 3 | }
|
|---|
| 4 | way[highway=~/^(unclassified|residential|living_street|service)$/] {
|
|---|
| 5 | set minor_road;
|
|---|
| 6 | }
|
|---|
| 7 |
|
|---|
| 8 | 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)[.]?$/] {
|
|---|
| 9 | throwWarning: tr("abbreviated street name");
|
|---|
| 10 | assertMatch: "way highway=unclassified name=\"Foo Ave\"";
|
|---|
| 11 | assertMatch: "way highway=unclassified name=\"Foo Ave.\"";
|
|---|
| 12 | assertMatch: "way highway=unclassified name=\"Bou Blvd.\"";
|
|---|
| 13 | assertMatch: "way highway=unclassified name=\"Bou blvd.\"";
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | node[highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service|living_street|pedestrian|track|path|footway/][highway!=motorway_junction][highway!=services] {
|
|---|
| 17 | throwWarning: tr("wrong highway tag on a node");
|
|---|
| 18 | assertMatch: "node highway=primary";
|
|---|
| 19 | assertMatch: "node highway=primary_link";
|
|---|
| 20 | assertNoMatch: "node highway=traffic_calming";
|
|---|
| 21 | assertNoMatch: "node highway=bus_stop";
|
|---|
| 22 | assertNoMatch: "node highway=crossing";
|
|---|
| 23 | assertNoMatch: "node highway=emergency_access_point";
|
|---|
| 24 | assertNoMatch: "node highway=give_way";
|
|---|
| 25 | assertNoMatch: "node highway=mini_roundabout";
|
|---|
| 26 | assertNoMatch: "node highway=motorway_junction";
|
|---|
| 27 | assertNoMatch: "node highway=passing_place";
|
|---|
| 28 | assertNoMatch: "node highway=rest_area";
|
|---|
| 29 | assertNoMatch: "node highway=speed_camera";
|
|---|
| 30 | assertNoMatch: "node highway=street_lamp";
|
|---|
| 31 | assertNoMatch: "node highway=services";
|
|---|
| 32 | assertNoMatch: "node highway=stop";
|
|---|
| 33 | assertNoMatch: "node highway=traffic_signals";
|
|---|
| 34 | assertNoMatch: "node highway=turning_circle";
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | way[highway=crossing], way[railway=crossing] {
|
|---|
| 38 | throwWarning: tr("wrong crossing tag on a way");
|
|---|
| 39 | assertMatch: "way highway=crossing";
|
|---|
| 40 | assertNoMatch: "node highway=crossing";
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | way[highway=unclassified][!name] {
|
|---|
| 44 | throwOther: tr("Unnamed unclassified highway");
|
|---|
| 45 | assertMatch: "way highway=unclassified";
|
|---|
| 46 | assertNoMatch: "way highway=unclassified name=Foo";
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | way.major_road[!ref] {
|
|---|
| 50 | throwOther: tr("highway without a reference");
|
|---|
| 51 | assertMatch: "way highway=primary";
|
|---|
| 52 | assertNoMatch: "way highway=primary ref=123";
|
|---|
| 53 | }
|
|---|
| 54 |
|
|---|
| 55 | way[highway=road] {
|
|---|
| 56 | throwWarning: tr("temporary highway type");
|
|---|
| 57 | assertMatch: "way highway=road";
|
|---|
| 58 | assertNoMatch: "way highway=residential";
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | way[highway=footway][maxspeed],
|
|---|
| 62 | way[highway=steps][maxspeed],
|
|---|
| 63 | way[highway=cycleway][bicycle?!],
|
|---|
| 64 | way[highway=footway][foot?!],
|
|---|
| 65 | way[highway=cycleway][cycleway=lane] {
|
|---|
| 66 | throwWarning: tr("{0} used with {1}", "{0.value}", "{1.tag}");
|
|---|
| 67 | assertMatch: "way highway=cycleway bicycle=false";
|
|---|
| 68 | assertMatch: "way highway=cycleway bicycle=0";
|
|---|
| 69 | assertNoMatch: "way highway=cycleway bicycle=yes";
|
|---|
| 70 | assertNoMatch: "way highway=cycleway";
|
|---|
| 71 | assertMatch: "way highway=footway foot=false";
|
|---|
| 72 | assertMatch: "way highway=footway foot=0";
|
|---|
| 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.*/] {
|
|---|
| 84 | throwOther: tr("street name contains ss");
|
|---|
| 85 | assertMatch: "way name=Foobarstrasse";
|
|---|
| 86 | assertMatch: "way name=Foobar-Strassenweg";
|
|---|
| 87 | assertNoMatch: "way name=Foobarstraße";
|
|---|
| 88 | }
|
|---|