| 1 |
include 'inc/roadspeed'; |
| 2 |
|
| 3 |
name=* { name '${name}' } |
| 4 |
mkgmap:default_name=* { name '${mkgmap:default_name}' } |
| 5 |
mkgmap:display_name=* { addlabel '${mkgmap:display_name|subst:;=>/}' } |
| 6 |
|
| 7 |
mkgmap:label:1!=* & ref=* { addlabel '${ref|part:;:1}' } |
| 8 |
mkgmap:label:1!=* & int_ref=* { addlabel '${int_ref|part:;:1}' } |
| 9 |
mkgmap:label:1!=* & nat_ref=* { addlabel '${nat_ref|part:;:1}' } |
| 10 |
mkgmap:label:1!=* & reg_ref=* { addlabel '${reg_ref|part:;:1}' } |
| 11 |
|
| 12 |
ref=* { addlabel '${ref|part:;:1}'; addlabel '${ref|part:;:2}'; addlabel '${ref|part:;:3}' } |
| 13 |
int_ref=* { addlabel '${int_ref|part:;:1}'; addlabel '${int_ref|part:;:2}'; addlabel '${int_ref|part:;:3}' } |
| 14 |
nat_ref=* { addlabel '${nat_ref|part:;:1}'; addlabel '${nat_ref|part:;:2}'; addlabel '${nat_ref|part:;:3}' } |
| 15 |
reg_ref=* { addlabel '${reg_ref|part:;:1}'; addlabel '${reg_ref|part:;:2}'; addlabel '${reg_ref|part:;:3}' } |
| 16 |
|
| 17 |
highway=* & mkgmap:label:1=* & mkgmap:street!=* { add mkgmap:street='${mkgmap:label:1}' } |
| 18 |
|
| 19 |
toll=* { set mkgmap:toll='${toll}' } |
| 20 |
|
| 21 |
# new AccessMapping("access", RoadNetwork.NO_MAX), // must be first in list |
| 22 |
# new AccessMapping("bicycle", RoadNetwork.NO_BIKE), |
| 23 |
# new AccessMapping("carpool", RoadNetwork.NO_CARPOOL), |
| 24 |
# new AccessMapping("foot", RoadNetwork.NO_FOOT), |
| 25 |
# new AccessMapping("hgv", RoadNetwork.NO_TRUCK), |
| 26 |
# new AccessMapping("motorcar", RoadNetwork.NO_CAR), |
| 27 |
# new AccessMapping("motorcycle", RoadNetwork.NO_CAR), |
| 28 |
# new AccessMapping("psv", RoadNetwork.NO_BUS), |
| 29 |
# new AccessMapping("taxi", RoadNetwork.NO_TAXI), |
| 30 |
# new AccessMapping("emergency", RoadNetwork.NO_EMERGENCY), |
| 31 |
# new AccessMapping("delivery", RoadNetwork.NO_DELIVERY), |
| 32 |
# new AccessMapping("goods", RoadNetwork.NO_DELIVERY), |
| 33 |
# for (AccessMapping anAccessMap : accessMap) { |
| 34 |
# int index = anAccessMap.index; |
| 35 |
# String type = anAccessMap.type; |
| 36 |
# String accessTagValue = way.getTag(type); |
| 37 |
# if (accessTagValue == null) |
| 38 |
# continue; |
| 39 |
# if (accessExplicitlyDenied(accessTagValue)) { |
| 40 |
# if (index == RoadNetwork.NO_MAX) { |
| 41 |
# // everything is denied access |
| 42 |
# for (int j = 1; j < accessMap.length; ++j) |
| 43 |
# noAccess[accessMap[j].index] = true; |
| 44 |
# } else { |
| 45 |
# // just the specific vehicle class is denied |
| 46 |
# // access |
| 47 |
# noAccess[index] = true; |
| 48 |
# } |
| 49 |
# log.debug(type + " is not allowed in " + highwayType + " " + debugWayName); |
| 50 |
# } else if (accessExplicitlyAllowed(accessTagValue)) { |
| 51 |
# if (index == RoadNetwork.NO_MAX) { |
| 52 |
# // everything is allowed access |
| 53 |
# for (int j = 1; j < accessMap.length; ++j) |
| 54 |
# noAccess[accessMap[j].index] = false; |
| 55 |
# } else { |
| 56 |
# // just the specific vehicle class is allowed |
| 57 |
# // access |
| 58 |
# noAccess[index] = false; |
| 59 |
# } |
| 60 |
# log.debug(type + " is allowed in " + highwayType + " " + debugWayName); |
| 61 |
# } |
| 62 |
# else if (accessTagValue.equalsIgnoreCase("destination")) { |
| 63 |
# if (type.equals("motorcar") || |
| 64 |
# type.equals("motorcycle")) { |
| 65 |
# road.setNoThroughRouting(); |
| 66 |
# } else if (type.equals("access")) { |
| 67 |
# log.info("access=destination only affects routing for cars in " + highwayType + " " + debugWayName); |
| 68 |
# road.setNoThroughRouting(); |
| 69 |
# } else { |
| 70 |
# log.info(type + "=destination ignored in " + highwayType + " " + debugWayName); |
| 71 |
# } |
| 72 |
# } else if (accessTagValue.equalsIgnoreCase("unknown")) { |
| 73 |
# // implicitly allow access |
| 74 |
# } else { |
| 75 |
# log.info("Ignoring unsupported access tag value " + type + "=" + accessTagValue + " in " + highwayType + " " + debugWayName); |
| 76 |
# } |
| 77 |
# } |
| 78 |
# |
| 79 |
|
| 80 |
# mkgmap:carpool tag is set but before new access handling was introduced it had a |
| 81 |
# different meaning. Copy it to keep its value which is handled in the old behaviour last. |
| 82 |
mkgmap:carpool=* { set mkgmap:carpool_compat='${mkgmap:carpool}'; delete mkgmap:carpool } |
| 83 |
|
| 84 |
access=private | access=no { setaccess no; set mkgmap:carpool=yes; } |
| 85 |
access=yes | access=permissive | access=official | access=designated { setaccess yes; set mkgmap:carpool=no; } |
| 86 |
access=destination { set mkgmap:throughroute=no } |
| 87 |
|
| 88 |
bicycle=private | bicycle=no { set mkgmap:bicycle=no; } |
| 89 |
bicycle=yes | bicycle=permissive | bicycle=official | bicycle=designated { set mkgmap:bicycle=yes; } |
| 90 |
|
| 91 |
carpool=private | carpool=no { set mkgmap:carpool=no; } |
| 92 |
carpool=yes | carpool=permissive | carpool=official | carpool=designated { set mkgmap:carpool=yes; } |
| 93 |
|
| 94 |
foot=private | foot=no { set mkgmap:foot=no; } |
| 95 |
foot=yes | foot=permissive | foot=official | foot=designated { set mkgmap:foot=yes; } |
| 96 |
|
| 97 |
hgv=private | hgv=no { set mkgmap:truck=no; } |
| 98 |
hgv=yes | hgv=permissive | hgv=official | hgv=designated { set mkgmap:truck=yes; } |
| 99 |
|
| 100 |
motorcar=private | motorcar=no { set mkgmap:car=no; } |
| 101 |
motorcar=yes | motorcar=permissive | motorcar=official | motorcar=designated { set mkgmap:car=yes; } |
| 102 |
motorcar=destination { set mkgmap:throughroute=no } |
| 103 |
|
| 104 |
motorcycle=private | motorcycle=no { set mkgmap:car=no; } |
| 105 |
motorcycle=yes | motorcycle=permissive | motorcycle=official | motorcycle=designated { set mkgmap:car=yes; } |
| 106 |
motorcycle=destination { set mkgmap:throughroute=no } |
| 107 |
|
| 108 |
psv=private | psv=no { set mkgmap:bus=no; } |
| 109 |
psv=yes | psv=permissive | psv=official | psv=designated { set mkgmap:bus=yes; } |
| 110 |
|
| 111 |
taxi=private | taxi=no { set mkgmap:taxi=no; } |
| 112 |
taxi=yes | taxi=permissive | taxi=official | taxi=designated { set mkgmap:taxi=yes; } |
| 113 |
|
| 114 |
emergency=private | emergency=no { set mkgmap:emergency=no; } |
| 115 |
emergency=yes | emergency=permissive | emergency=official | emergency=designated { set mkgmap:emergency=yes; } |
| 116 |
|
| 117 |
delivery=private | delivery=no { set mkgmap:delivery=no; } |
| 118 |
delivery=yes | delivery=permissive | delivery=official | delivery=designated { set mkgmap:delivery=yes; } |
| 119 |
|
| 120 |
goods=private | goods=no { set mkgmap:delivery=no; } |
| 121 |
goods=yes | goods=permissive | goods=official | goods=designated { set mkgmap:delivery=yes; } |
| 122 |
|
| 123 |
# Reintroduce the old carpool handling which allows access only for bus and emergency plus setting the carpool bit |
| 124 |
mkgmap:carpool_compat=yes { setaccess no; set mkgmap:bus=yes; set mkgmap:emergency=yes; set mkgmap:carpool=yes } |
| 125 |
|