Advertisement
Guest User

profil Broutera do turystyki pieszej

a guest
Sep 3rd, 2014
809
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. # *** The hiking profile is for safe hiking
  2. # *** that avoids car traffic, with a preference
  3. # *** for hiking routes.
  4.  
  5. ---context:global # following code refers to global config
  6.  
  7. # Use the following switches to change behaviour
  8. # (1=yes, 0=no):
  9.  
  10. assign consider_elevation 1 # set to 0 to ignore elevation in routing
  11. assign allow_ferries 0 # set to 0 to disallow ferries
  12. assign ignore_hikeroutes 0 # set to 1 for better elevation results
  13. assign stick_to_hikeroutes 0 # set to 1 to just follow hike routes
  14.  
  15. assign validForFoot 1
  16.  
  17. # the elevation parameters
  18.  
  19. assign downhillcost 0
  20. assign downhillcutoff 1.5
  21. assign uphillcost switch consider_elevation 3 0 # elevation penalty reduced from 60 to 3
  22. assign uphillcutoff 1.5
  23.  
  24. ---context:way # following code refers to way-tags
  25.  
  26. #
  27. # pre-calculate some logical expressions
  28. #
  29.  
  30. assign any_hikeroute or route_hiking_=yes or route_hiking_iwn=yes or route_hiking_nwn=yes or route_hiking_rwn=yes or route_hiking_lwn=yes or route_foot_=yes or route_foot_nwn=yes or route_foot_rwn=yes route_foot_lwn=yes
  31. assign nodeaccessgranted any_hikeroute
  32.  
  33. assign is_hr and any_hikeroute not ignore_hikeroutes
  34.  
  35.  
  36. #
  37. # this is the cost (in Meter) for a 90-degree turn
  38. # The actual cost is calculated as turncost*cos(angle)
  39. # (Suppressing turncost while following longdistance-cycleways
  40. # makes them a little bit more magnetic)
  41. #
  42. assign turncost 0
  43.  
  44. #
  45. # calculate the initial cost
  46. # this is added to the total cost each time the costfactor
  47. # changed
  48. #
  49. assign initialcost switch route=ferry 10000 0
  50.  
  51. #
  52. # implicit access here just from the motorroad tag
  53. # (implicit access rules from highway tag handled elsewhere)
  54. #
  55. assign defaultaccess
  56. switch access=
  57. not motorroad=yes
  58. switch or access=private access=no
  59. 0
  60. 1
  61.  
  62. #
  63. # calculate logical bike access
  64. #
  65. assign bikeaccess
  66. or any_hikeroute
  67. switch bicycle=
  68. switch vehicle=
  69. defaultaccess
  70. switch or vehicle=private vehicle=no
  71. 0
  72. 1
  73. not or bicycle=private or bicycle=no bicycle=dismount
  74.  
  75. #
  76. # calculate logical foot access
  77. #
  78. assign footaccess
  79. or bikeaccess
  80. or bicycle=dismount
  81. switch foot=
  82. defaultaccess
  83. not or foot=private foot=no
  84.  
  85. #
  86. # if not bike-, but foot-acess, just a moderate penalty,
  87. # otherwise access is forbidden
  88. #
  89. assign accesspenalty
  90. switch bikeaccess
  91. 0
  92. switch footaccess
  93. 0
  94. 100000
  95.  
  96. assign onewaypenalty 0.0
  97.  
  98. #
  99. # calculate the cost-factor, which is the factor
  100. # by which the distance of a way-segment is multiplied
  101. # to calculate the cost of that segment. The costfactor
  102. # must be >=1 and it's supposed to be close to 1 for
  103. # the type of way the routing profile is searching for
  104. #
  105. assign costfactor
  106.  
  107. add max onewaypenalty accesspenalty
  108.  
  109. switch and highway= not route=ferry 100000
  110.  
  111. #
  112. # steps and ferries are special. Note this is handled
  113. # before the cycleroute-switch, to be able
  114. # to really exlude them be setting cost to infinity
  115. #
  116. switch route=ferry switch allow_ferries 5.67 100000
  117.  
  118. #
  119. # handle hike-routes.
  120. #
  121. switch is_hr 1 # always treated as perfect (=1)
  122. add switch stick_to_hikeroutes 1 0.15 # everything else somewhat up
  123.  
  124. #
  125. # some other highway types
  126. #
  127. switch highway=steps 1
  128. switch highway=pedestrian 1
  129. switch highway=bridleway 1
  130. switch highway=cycleway 10
  131. switch or highway=residential highway=living_street 1.1
  132. switch highway=service 1.1
  133.  
  134. #
  135. # tracks and track-like ways are rated mainly be tracktype/grade
  136. # But note that if no tracktype is given (mainly for road/path/footway)
  137. # it can be o.k. if there's any other hint for quality
  138. #
  139. switch or highway=track or highway=road or highway=path highway=footway 1
  140.  
  141. #
  142. # exclude motorways and proposed roads
  143. #
  144. switch or highway=motorway highway=motorway_link 100000
  145. switch or highway=proposed or highway=abandoned highway=construction 100000
  146.  
  147. #
  148. # actuals roads are o.k.
  149. #
  150. switch or highway=trunk highway=trunk_link 15
  151. switch or highway=primary highway=primary_link 2.5
  152. switch or highway=secondary highway=secondary_link 1.5
  153. switch or highway=tertiary highway=tertiary_link 1.2
  154. switch highway=unclassified 1.1
  155.  
  156. #
  157. # default for any other highway type not handled above
  158. #
  159. 2.0
  160.  
  161.  
  162. ---context:node # following code refers to node tags
  163.  
  164. assign defaultaccess
  165. switch access=
  166. 1 # add default barrier restrictions here!
  167. switch or access=private access=no
  168. 0
  169. 1
  170.  
  171. assign bikeaccess
  172. or nodeaccessgranted=yes
  173. switch bicycle=
  174. switch vehicle=
  175. defaultaccess
  176. switch or vehicle=private vehicle=no
  177. 0
  178. 1
  179. switch or bicycle=private or bicycle=no bicycle=dismount
  180. 0
  181. 1
  182.  
  183. assign footaccess
  184. or bicycle=dismount
  185. switch foot=
  186. defaultaccess
  187. switch or foot=private foot=no
  188. 0
  189. 1
  190.  
  191. assign initialcost
  192. switch bikeaccess
  193. 0
  194. switch footaccess
  195. 0
  196. 1000000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement