source: josm/trunk/data/validator/highway.mapcss @ 7281

Last change on this file since 7281 was 7281, checked in by Don-vip, 5 years ago

fix #10209 - exclude highway=*_link from "highway without a reference" test

File size: 3.4 KB
Line 
1way[highway=~/^(motorway|trunk|primary|secondary|tertiary)$/] {
2  set major_road;
3}
4way[highway=~/^.*_link$/] {
5  set link_road;
6}
7way[highway=~/^(unclassified|residential|living_street|service)$/] {
8  set minor_road;
9}
10
11way[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
19node[highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service|living_street|pedestrian|track|path|footway/][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
40way[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
46way[highway=unclassified][!name] {
47  throwOther: tr("Unnamed unclassified highway");
48  assertMatch: "way highway=unclassified";
49  assertNoMatch: "way highway=unclassified name=Foo";
50}
51
52way.major_road[!ref] {
53  throwOther: tr("highway without a reference");
54  assertMatch: "way highway=primary";
55  assertNoMatch: "way highway=primary ref=123";
56}
57
58way[highway=road] {
59  throwWarning: tr("temporary highway type");
60  assertMatch: "way highway=road";
61  assertNoMatch: "way highway=residential";
62}
63
64way[highway=footway][maxspeed],
65way[highway=steps][maxspeed],
66way[highway=cycleway][bicycle?!],
67way[highway=footway][foot?!],
68way[highway=cycleway][cycleway=lane] {
69  throwWarning: tr("{0} used with {1}", "{0.value}", "{1.tag}");
70  assertMatch: "way highway=cycleway bicycle=false";
71  assertMatch: "way highway=cycleway bicycle=0";
72  assertNoMatch: "way highway=cycleway bicycle=yes";
73  assertNoMatch: "way highway=cycleway";
74  assertMatch: "way highway=footway foot=false";
75  assertMatch: "way highway=footway foot=0";
76  assertNoMatch: "way highway=footway foot=yes";
77  assertNoMatch: "way highway=footway";
78  assertMatch: "way highway=cycleway cycleway=lane";
79  assertNoMatch: "way highway=cycleway";
80  assertNoMatch: "way highway=residential cycleway=lane";
81  assertMatch: "way highway=footway maxspeed=20";
82  assertNoMatch: "way highway=residential maxspeed=20";
83  assertNoMatch: "way highway=footway";
84}
85
86*[name =~ /(?i).*Strasse.*/] {
87  throwOther: tr("street name contains ss");
88  assertMatch: "way name=Foobarstrasse";
89  assertMatch: "way name=Foobar-Strassenweg";
90  assertNoMatch: "way name=Foobarstraße";
91}
Note: See TracBrowser for help on using the repository browser.