Debian Codegraph @

resources/styles/default/inc/access

raw
1 # Define the access restrictions
2 # The following tags define the restrictions:
3 # mkgmap:bicycle
4 # mkgmap:foot
5 # mkgmap:car
6 # mkgmap:truck
7 # mkgmap:taxi
8 # mkgmap:bus
9 # mkgmap:emergency
10 # mkgmap:delivery
11 # A class is not allowed to use the way if its tag is set to 'no'
12
13 # First set access settings with high priority.
14 #
15 # In case a way is tagged with
16 # highway=motorway;access=yes
17 # we assume that foot and bikes are not allowed anyhow.
18
19 highway=* & motorroad=yes { add bicycle=no; add foot=no; }
20 highway=motorway | highway=motorway_link { add bicycle=no; add foot=no; }
21
22 (access=agricultural | access=forestry) { set access=no; add foot=yes }
23
24 # Now fill the access tree (http://wiki.openstreetmap.org/wiki/Key:access)
25 # This is required so that subsequent rules do not add a tag (bicycle) which is already defined by a higher tag (vehicle)
26 access=* { add foot='${access}'; add vehicle='${access}'; }
27 vehicle=* { add bicycle='${vehicle}'; add motor_vehicle='${vehicle}'; }
28 motor_vehicle=* { add motorcar='${motor_vehicle}'; add goods='${motor_vehicle}'; add hgv='${motor_vehicle}'; add psv='${motor_vehicle}'; add emergency='${motor_vehicle}'; }
29 psv=* { add taxi='${psv}'; add bus='${psv}'; }
30
31
32 # Include country specific access rules that are derived from the highway type
33 include 'inc/access_country';
34
35 # Add common access rules that are derived from the highway type
36 highway=steps { add foot=yes; add access=no }
37 highway=pedestrian & area!=yes { add foot=yes; add access=no }
38 highway=path { add foot=yes; add bicycle=yes; add access=no }
39 highway=bridleway { add access=no }
40 highway=cycleway { add bicycle=yes; add access=no }
41 highway=footway { add foot=yes; add access=no }
42 railway=platform { add foot=yes; add access=no }
43
44 # throughroute cannot be handled differently for different vehicle types
45 # Therefore we have to choose one vehicle type - and the winner is: motorcar
46 motorcar=destination | motorcar=delivery { set mkgmap:throughroute=no; set motorcar=yes }
47 access=destination | access=delivery { set mkgmap:throughroute=no; set access=yes }
48
49 # Normalize all values that indicate a restriction to 'no'
50 foot=private | foot=agricultural | foot=forestry { set foot=no }
51 bicycle=private | bicycle=agricultural | bicycle=forestry { set bicycle=no }
52 motorcar=private | motorcar=agricultural | motorcar=forestry { set motorcar=no }
53 goods=private | goods=agricultural | goods=forestry { set goods=no }
54 hgv=private | hgv=agricultural | hgv=forestry { set hgv=no }
55 bus=private | bus=agricultural | bus=forestry { set bus=no }
56 taxi=private | taxi=agricultural | taxi=forestry { set taxi=no }
57 emergency=private | emergency=agricultural | emergency=forestry { set emergency=no }
58
59 # Copy the OSM access tags to the mkgmap internal tags
60 foot=* { set mkgmap:foot='${foot}' }
61 bicycle=* { set mkgmap:bicycle='${bicycle}' }
62 motorcar=* { set mkgmap:car='${motorcar}' }
63 goods=* { set mkgmap:delivery='${goods}' }
64 hgv=* { set mkgmap:truck='${hgv}' }
65 bus=* { set mkgmap:bus='${bus}' }
66 taxi=* { set mkgmap:taxi='${taxi}' }
67 emergency=* { set mkgmap:emergency='${emergency}' }
68
69 # The access tag defines all restrictions that are not already set
70 access=* { addaccess '${access}' }
71
72 # Check for carpool lane (they are not really supported yet so these lines are commented)
73 # hov=* { add carpool='${hov}' }
74 # (carpool=yes | carpool=designated | carpool=permissive | carpool=official) { set mkgmap:carpool=yes }
75
76 # Don't route through highway=construction, they are considered unusable
77 highway=construction {setaccess no}
78