| 1 | way[highway][name =~ /(?i).* (Ave|Blvd|Br|Brg|Cct|Cir|Cl|Cr|Crct|Cres|Crt|Ct|Dr|Drv|Esp|Espl|Hwy|Ln|Mw|Mwy|Pl|Rd|Qy|Qys|Sq|St|Str|Ter|Tce|Tr|Wy)[.]?$/] {
|
|---|
| 2 | throwWarning: tr("abbreviated street name");
|
|---|
| 3 | assertMatch: "way highway=unclassified name=\"Foo Ave\"";
|
|---|
| 4 | assertMatch: "way highway=unclassified name=\"Foo Ave.\"";
|
|---|
| 5 | assertMatch: "way highway=unclassified name=\"Bou Blvd.\"";
|
|---|
| 6 | assertMatch: "way highway=unclassified name=\"Bou blvd.\"";
|
|---|
| 7 | }
|
|---|
| 8 |
|
|---|
| 9 | node[oneway] {
|
|---|
| 10 | throwWarning: tr("oneway tag on a node");
|
|---|
| 11 | assertMatch: "node oneway=-1";
|
|---|
| 12 | assertNoMatch: "way oneway=-1";
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | node[bridge?] {
|
|---|
| 16 | throwWarning: tr("bridge tag on a node");
|
|---|
| 17 | assertMatch: "node bridge=yes";
|
|---|
| 18 | assertNoMatch: "node bridge=13";
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | node[highway =~ /motorway*|trunk*|primary*|secondary*|tertiary*|unclassified|residential|service|living_street|pedestrian|track|path|footway/] {
|
|---|
| 22 | throwWarning: tr("wrong highway tag on a node");
|
|---|
| 23 | assertMatch: "node highway=primary";
|
|---|
| 24 | assertMatch: "node highway=primary_link";
|
|---|
| 25 | assertNoMatch: "node highway=crossing";
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | way[highway=crossing], way[railway=crossing] {
|
|---|
| 29 | throwWarning: tr("wrong crossing tag on a way");
|
|---|
| 30 | assertMatch: "way highway=crossing";
|
|---|
| 31 | assertNoMatch: "node highway=crossing";
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
| 34 | way[highway=unclassified][!name] {
|
|---|
| 35 | throwOther: tr("Unnamed unclassified highway");
|
|---|
| 36 | assertMatch: "way highway=unclassified";
|
|---|
| 37 | assertNoMatch: "way highway=unclassified name=Foo";
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 | way[highway =~ /motorway|trunk|primary|secondary|tertiary/][!ref] {
|
|---|
| 41 | throwOther: tr("highway without a reference");
|
|---|
| 42 | assertMatch: "way highway=primary";
|
|---|
| 43 | assertNoMatch: "way highway=primary ref=123";
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | way[highway=road] {
|
|---|
| 47 | throwWarning: tr("temporary highway type");
|
|---|
| 48 | assertMatch: "way highway=road";
|
|---|
| 49 | assertNoMatch: "way highway=residential";
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 | way[highway=cycleway][bicycle?!] {
|
|---|
| 53 | throwWarning: tr("cycleway with tag bicycle");
|
|---|
| 54 | assertMatch: "way highway=cycleway bicycle=false";
|
|---|
| 55 | assertMatch: "way highway=cycleway bicycle=0";
|
|---|
| 56 | assertNoMatch: "way highway=cycleway bicycle=yes";
|
|---|
| 57 | assertNoMatch: "way highway=cycleway";
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | way[highway=footway][foot?!] {
|
|---|
| 61 | throwWarning: tr("footway with tag foot");
|
|---|
| 62 | assertMatch: "way highway=footway foot=false";
|
|---|
| 63 | assertMatch: "way highway=footway foot=0";
|
|---|
| 64 | assertNoMatch: "way highway=footway foot=yes";
|
|---|
| 65 | assertNoMatch: "way highway=footway";
|
|---|
| 66 | }
|
|---|
| 67 |
|
|---|
| 68 | way[highway=cycleway][cycleway=lane] {
|
|---|
| 69 | throwWarning: tr("separate cycleway as lane on a cycleway");
|
|---|
| 70 | assertMatch: "way highway=cycleway cycleway=lane";
|
|---|
| 71 | assertNoMatch: "way highway=cycleway";
|
|---|
| 72 | assertNoMatch: "way highway=residential cycleway=lane";
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 | way[highway][barrier] {
|
|---|
| 76 | throwWarning: tr("barrier used on a way");
|
|---|
| 77 | assertMatch: "way highway=residential barrier=hedge";
|
|---|
| 78 | assertNoMatch: "way highway=residential";
|
|---|
| 79 | assertNoMatch: "way barrier=hedge";
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 | way[highway=footway][maxspeed], way[highway=steps][maxspeed] {
|
|---|
| 83 | throwWarning: tr("maxspeed used for footway");
|
|---|
| 84 | assertMatch: "way highway=footway maxspeed=20";
|
|---|
| 85 | assertNoMatch: "way highway=residential maxspeed=20";
|
|---|
| 86 | assertNoMatch: "way highway=footway";
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | *[name =~ /(?i).*Strasse.*/] {
|
|---|
| 90 | throwWarning: tr("street name contains ss");
|
|---|
| 91 | assertMatch: "way name=Foobarstrasse";
|
|---|
| 92 | assertMatch: "way name=Foobar-Strassenweg";
|
|---|
| 93 | assertNoMatch: "way name=Foobarstraße";
|
|---|
| 94 | }
|
|---|
| 95 |
|
|---|
| 96 | /*
|
|---|
| 97 | TODO: * : W : / *name * /i == * && name != * # misspelled key name
|
|---|
| 98 | */
|
|---|