Advertisement
Guest User

profil Broutera dla bezpiecznej jazdy rowerem przez miasto

a guest
Sep 3rd, 2014
1,101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.99 KB | None | 0 0
  1. # *** This profile is for safe travel in cities
  2. # *** and avoiding car traffic, but still with
  3. # *** a focus on approaching your destination
  4. # *** efficiently.
  5.  
  6. ---context:global # following code refers to global config
  7.  
  8. # Use the following switches to change behaviour
  9. # (1=yes, 0=no):
  10.  
  11. assign consider_elevation 1 # set to 0 to ignore elevation in routing
  12. assign allow_steps 1 # set to 0 to disallow steps
  13. assign allow_ferries 0 # set to 0 to disallow ferries
  14. assign ignore_cycleroutes 0 # set to 1 for better elevation results
  15. assign stick_to_cycleroutes 0 # set to 1 to just follow cycleroutes
  16. assign avoid_unsafe 0 # set to 1 to avoid standard highways
  17.  
  18. assign validForBikes 1
  19.  
  20. # the elevation parameters
  21.  
  22. assign downhillcost 0
  23. assign downhillcutoff 1.5
  24. assign uphillcost switch consider_elevation 60 0
  25. assign uphillcutoff 1.5
  26.  
  27. ---context:way # following code refers to way-tags
  28.  
  29. #
  30. # pre-calculate some logical expressions
  31. #
  32.  
  33. assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
  34. assign nodeaccessgranted or any_cycleroute lcn=yes
  35.  
  36. assign is_ldcr and any_cycleroute not ignore_cycleroutes
  37. assign isbike or bicycle=yes or or bicycle=permissive bicycle=designated lcn=yes
  38. assign ispaved or surface=paved or surface=asphalt or surface=concrete surface=paving_stones
  39. assign isunpaved not or surface= or ispaved or surface=fine_gravel surface=cobblestone
  40. assign probablyGood or ispaved and isbike not isunpaved
  41.  
  42.  
  43. #
  44. # this is the cost (in Meter) for a 90-degree turn
  45. # The actual cost is calculated as turncost*cos(angle)
  46. # (Suppressing turncost while following longdistance-cycleways
  47. # makes them a little bit more magnetic)
  48. #
  49. assign turncost switch is_ldcr 0 40 ## decreased from 90 to 40
  50.  
  51. #
  52. # calculate the initial cost
  53. # this is added to the total cost each time the costfactor
  54. # changed
  55. #
  56. assign initialcost switch route=ferry 10000 0
  57.  
  58. #
  59. # implicit access here just from the motorroad tag
  60. # (implicit access rules from highway tag handled elsewhere)
  61. #
  62. assign defaultaccess
  63. switch access=
  64. not motorroad=yes
  65. switch or access=private access=no
  66. 0
  67. 1
  68.  
  69. #
  70. # calculate logical bike access
  71. #
  72. assign bikeaccess
  73. or any_cycleroute
  74. switch bicycle=
  75. switch vehicle=
  76. defaultaccess
  77. switch or vehicle=private vehicle=no
  78. 0
  79. 1
  80. not or bicycle=private or bicycle=no bicycle=dismount
  81.  
  82. #
  83. # calculate logical foot access
  84. #
  85. assign footaccess
  86. or bikeaccess
  87. or bicycle=dismount
  88. switch foot=
  89. defaultaccess
  90. not or foot=private foot=no
  91.  
  92. #
  93. # if not bike-, but foot-acess, just a moderate penalty,
  94. # otherwise access is forbidden
  95. #
  96. assign accesspenalty
  97. switch bikeaccess
  98. 0
  99. switch footaccess
  100. 4
  101. 100000
  102.  
  103. #
  104. # handle one-ways. On primary roads, wrong-oneways should
  105. # be close to forbidden, while on other ways we just add
  106. # 4 to the costfactor (making it at least 5 - you are allowed
  107. # to push your bike)
  108. #
  109. assign oneway
  110. switch oneway=
  111. junction=roundabout
  112. or oneway=yes or oneway=true oneway=1
  113.  
  114. assign onewaypenalty
  115. switch switch reversedirection=yes oneway oneway=-1
  116. switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0
  117. switch or highway=primary highway=primary_link 50
  118. switch or highway=secondary highway=secondary_link 30
  119. switch or highway=tertiary highway=tertiary_link 20
  120. 4.0
  121. 0.0
  122.  
  123. #
  124. # calculate the cost-factor, which is the factor
  125. # by which the distance of a way-segment is multiplied
  126. # to calculate the cost of that segment. The costfactor
  127. # must be >=1 and it's supposed to be close to 1 for
  128. # the type of way the routing profile is searching for
  129. #
  130. assign costfactor
  131.  
  132. add max onewaypenalty accesspenalty
  133.  
  134. switch and highway= not route=ferry 100000
  135.  
  136. #
  137. # steps and ferries are special. Note this is handled
  138. # before the cycleroute-switch, to be able
  139. # to really exlude them be setting cost to infinity
  140. #
  141. switch highway=steps switch allow_steps 10 100000 ## decreased from 40 to 10
  142. switch route=ferry switch allow_ferries 5.67 100000
  143.  
  144. #
  145. # handle long-distance cycle-routes.
  146. #
  147. switch is_ldcr 1 # always treated as perfect (=1)
  148. add switch stick_to_cycleroutes 0.5 0.05 # everything else somewhat up
  149.  
  150. #
  151. # some other highway types
  152. #
  153. switch highway=pedestrian 3
  154. switch highway=bridleway 5
  155. switch highway=cycleway 1
  156. switch or highway=path highway=footway switch isbike 1.0 2.0 ## perfect (=1) for bike-enabled paths or somewhere between tertiary and secondary for ordinary paths
  157. switch or highway=residential highway=living_street switch isunpaved 1.5 1.1
  158. switch highway=service switch isunpaved 1.6 1.3
  159.  
  160. #
  161. # tracks and track-like ways are rated mainly be tracktype/grade
  162. # But note that if no tracktype is given (mainly for road/path/footway)
  163. # it can be o.k. if there's any other hint for quality
  164. #
  165. switch or highway=track highway=road
  166. switch tracktype=grade1 switch probablyGood 1.0 1.1 ## unpaved decreased from 1.3 to 1.1
  167. switch tracktype=grade2 switch probablyGood 1.1 1.2 ## unpaved decreased from 2 to 1.2
  168. switch tracktype=grade3 switch probablyGood 1.5 2.0 ## unpaved decreased from 3 to 2
  169. switch tracktype=grade4 switch probablyGood 2.0 2.5 ## unpaved decreased from 5 to 2.5
  170. switch tracktype=grade5 switch probablyGood 3.0 5.0
  171. switch probablyGood 1.0 2.0 ## unpaved decreased from 5 to 2
  172.  
  173. #
  174. # When avoiding unsafe ways, avoid highways without a bike hint
  175. #
  176. add switch and avoid_unsafe not isbike 2 0
  177.  
  178. #
  179. # exclude motorways and proposed roads
  180. #
  181. switch or highway=motorway highway=motorway_link 100000
  182. switch or highway=proposed or highway=abandoned highway=construction 100000
  183.  
  184. #
  185. # actuals roads are o.k. if we have a bike hint
  186. #
  187. switch or highway=trunk highway=trunk_link switch isbike 1.5 30 ## increased from 10 to 30
  188. switch or highway=primary highway=primary_link switch isbike 1.2 5 ## increased from 3 to 5
  189. switch or highway=secondary highway=secondary_link switch isbike 1.1 2.5 ## increased from 1.6 to 2.5
  190. switch or highway=tertiary highway=tertiary_link switch isbike 1.0 1.6 ## increased from 1.4 to 1.6
  191. switch highway=unclassified switch isbike 1.0 1.3
  192.  
  193. #
  194. # default for any other highway type not handled above
  195. #
  196. 2.0
  197.  
  198.  
  199. ---context:node # following code refers to node tags
  200.  
  201. assign defaultaccess
  202. switch access=
  203. 1 # add default barrier restrictions here!
  204. switch or access=private access=no
  205. 0
  206. 1
  207.  
  208. assign bikeaccess
  209. or nodeaccessgranted=yes
  210. switch bicycle=
  211. switch vehicle=
  212. defaultaccess
  213. switch or vehicle=private vehicle=no
  214. 0
  215. 1
  216. switch or bicycle=private or bicycle=no bicycle=dismount
  217. 0
  218. 1
  219.  
  220. assign footaccess
  221. or bicycle=dismount
  222. switch foot=
  223. defaultaccess
  224. switch or foot=private foot=no
  225. 0
  226. 1
  227.  
  228. assign initialcost
  229. switch bikeaccess
  230. 0
  231. switch footaccess
  232. 100
  233. 1000000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement