forked from poutnikl/Brouter-profiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sidewalks.brf
166 lines (132 loc) · 5.5 KB
/
Sidewalks.brf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#
# Shortest way allowed for pedestrains
#
---context:global # following code refers to global config
# the elevation parameters
assign downhillcost 0
assign downhillcutoff 1.5
assign uphillcost 0
assign uphillcutoff 1.5
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style
# strictfootways
# use 0 if fallback to other cummunications is allowed if no suitable communication is found
# use 1 if only path/footway/track or sidewalks are allowed
# Be aware if strictfootways=1 then lack of suitable communication cause routing failure,
# Incorrect/incomplete OSM mapping may cause false routing failure as well.
assign strictfootways 0
assign validForFoot 1
---context:way # following code refers to way-tags
assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
assign nodeaccessgranted or any_cycleroute lcn=yes
assign turncost 0
assign initialclassifier =
if route=ferry then 1
else 0
assign initialcost switch route=ferry 10000 0
#
# implicit access here just from the motorroad tag
# (implicit access rules from highway tag handled elsewhere)
#
assign defaultaccess
switch access=
not motorroad=yes
switch or access=private access=no
0
1
#
# calculate logical bike access
#
assign bikeaccess
or any_cycleroute
switch bicycle=
switch bicycle_road=yes
1
switch vehicle=
defaultaccess
switch or vehicle=private vehicle=no
0
1
not or bicycle=private or bicycle=no bicycle=dismount
#
# calculate logical foot access
#
assign footaccess
or bikeaccess
or bicycle=dismount
switch foot=
defaultaccess
not or foot=private foot=no
assign accesspenalty switch or bikeaccess footaccess 0 100000
assign costfactor
add accesspenalty
switch and highway= not route=ferry 100000
switch route=ferry 5.67
switch or highway=motorway highway=motorway_link 100000
switch or highway=proposed highway=abandoned 100000
switch or highway=path|track|footway sidewalk=left|right|both 1
switch strictfootways 10000
switch highway=residential|service|road 2
switch highway=unclassified|tertiary 3
5
# way priorities used for voice hint generation
assign isresidentialorliving = or highway=residential|living_street living_street=yes
assign priorityclassifier =
if ( highway=motorway ) then 30
else if ( highway=motorway_link ) then 29
else if ( highway=trunk ) then 28
else if ( highway=trunk_link ) then 27
else if ( highway=primary ) then 26
else if ( highway=primary_link ) then 25
else if ( highway=secondary ) then 24
else if ( highway=secondary_link ) then 23
else if ( highway=tertiary ) then 22
else if ( highway=tertiary_link ) then 21
else if ( highway=unclassified ) then 20
else if ( isresidentialorliving ) then 6
else if ( highway=service ) then 6
else if ( highway=cycleway ) then 6
else if ( or bicycle=designated bicycle_road=yes ) then 6
else if ( highway=track ) then if tracktype=grade1 then 6 else 4
else if ( highway=bridleway|road|path|footway ) then 4
else if ( highway=steps ) then 2
else if ( highway=pedestrian ) then 2
else 0
# some more classifying bits used for voice hint generation...
assign isroundabout = junction=roundabout
assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
assign isgoodforcars = if greater priorityclassifier 6 then true
else if ( or isresidentialorliving highway=service ) then true
else if ( and highway=track tracktype=grade1 ) then true
else false
# ... encoded into a bitmask
assign classifiermask add multiply isroundabout 4
add multiply islinktype 8
multiply isgoodforcars 16
# include `smoothness=` tags in the response's WayTags for track analysis
assign dummyUsage = smoothness=
---context:node # following code refers to node tags
assign defaultaccess
switch access=
1 # add default barrier restrictions here!
switch or access=private access=no
0
1
assign bikeaccess
or nodeaccessgranted=yes
switch bicycle=
switch vehicle=
defaultaccess
switch or vehicle=private vehicle=no
0
1
switch or bicycle=private or bicycle=no bicycle=dismount
0
1
assign footaccess
or bicycle=dismount
switch foot=
defaultaccess
switch or foot=private foot=no
0
1
assign initialcost switch or bikeaccess footaccess 0 1000000