# *** This profile is for safe travel in cities # *** and avoiding car traffic, but still with # *** a focus on approaching your destination # *** efficiently. ---context:global # following code refers to global config # Use the following switches to change behaviour # (1=yes, 0=no): assign consider_elevation 1 # set to 0 to ignore elevation in routing assign allow_steps 1 # set to 0 to disallow steps assign allow_ferries 0 # set to 0 to disallow ferries assign ignore_cycleroutes 0 # set to 1 for better elevation results assign stick_to_cycleroutes 0 # set to 1 to just follow cycleroutes assign avoid_unsafe 0 # set to 1 to avoid standard highways assign validForBikes 1 # the elevation parameters assign downhillcost 0 assign downhillcutoff 1.5 assign uphillcost switch consider_elevation 60 0 assign uphillcutoff 1.5 ---context:way # following code refers to way-tags # # pre-calculate some logical expressions # 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 is_ldcr and any_cycleroute not ignore_cycleroutes assign isbike or bicycle=yes or or bicycle=permissive bicycle=designated lcn=yes assign ispaved or surface=paved or surface=asphalt or surface=concrete surface=paving_stones assign isunpaved not or surface= or ispaved or surface=fine_gravel surface=cobblestone assign probablyGood or ispaved and isbike not isunpaved # # this is the cost (in Meter) for a 90-degree turn # The actual cost is calculated as turncost*cos(angle) # (Suppressing turncost while following longdistance-cycleways # makes them a little bit more magnetic) # assign turncost switch is_ldcr 0 40 ## decreased from 90 to 40 # # calculate the initial cost # this is added to the total cost each time the costfactor # changed # 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 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 # # if not bike-, but foot-acess, just a moderate penalty, # otherwise access is forbidden # assign accesspenalty switch bikeaccess 0 switch footaccess 4 100000 # # handle one-ways. On primary roads, wrong-oneways should # be close to forbidden, while on other ways we just add # 4 to the costfactor (making it at least 5 - you are allowed # to push your bike) # assign oneway switch oneway= junction=roundabout or oneway=yes or oneway=true oneway=1 assign onewaypenalty switch switch reversedirection=yes oneway oneway=-1 switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0 switch or highway=primary highway=primary_link 50 switch or highway=secondary highway=secondary_link 30 switch or highway=tertiary highway=tertiary_link 20 4.0 0.0 # # calculate the cost-factor, which is the factor # by which the distance of a way-segment is multiplied # to calculate the cost of that segment. The costfactor # must be >=1 and it's supposed to be close to 1 for # the type of way the routing profile is searching for # assign costfactor add max onewaypenalty accesspenalty switch and highway= not route=ferry 100000 # # steps and ferries are special. Note this is handled # before the cycleroute-switch, to be able # to really exlude them be setting cost to infinity # switch highway=steps switch allow_steps 10 100000 ## decreased from 40 to 10 switch route=ferry switch allow_ferries 5.67 100000 # # handle long-distance cycle-routes. # switch is_ldcr 1 # always treated as perfect (=1) add switch stick_to_cycleroutes 0.5 0.05 # everything else somewhat up # # some other highway types # switch highway=pedestrian 3 switch highway=bridleway 5 switch highway=cycleway 1 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 switch or highway=residential highway=living_street switch isunpaved 1.5 1.1 switch highway=service switch isunpaved 1.6 1.3 # # tracks and track-like ways are rated mainly be tracktype/grade # But note that if no tracktype is given (mainly for road/path/footway) # it can be o.k. if there's any other hint for quality # switch or highway=track highway=road switch tracktype=grade1 switch probablyGood 1.0 1.1 ## unpaved decreased from 1.3 to 1.1 switch tracktype=grade2 switch probablyGood 1.1 1.2 ## unpaved decreased from 2 to 1.2 switch tracktype=grade3 switch probablyGood 1.5 2.0 ## unpaved decreased from 3 to 2 switch tracktype=grade4 switch probablyGood 2.0 2.5 ## unpaved decreased from 5 to 2.5 switch tracktype=grade5 switch probablyGood 3.0 5.0 switch probablyGood 1.0 2.0 ## unpaved decreased from 5 to 2 # # When avoiding unsafe ways, avoid highways without a bike hint # add switch and avoid_unsafe not isbike 2 0 # # exclude motorways and proposed roads # switch or highway=motorway highway=motorway_link 100000 switch or highway=proposed or highway=abandoned highway=construction 100000 # # actuals roads are o.k. if we have a bike hint # switch or highway=trunk highway=trunk_link switch isbike 1.5 30 ## increased from 10 to 30 switch or highway=primary highway=primary_link switch isbike 1.2 5 ## increased from 3 to 5 switch or highway=secondary highway=secondary_link switch isbike 1.1 2.5 ## increased from 1.6 to 2.5 switch or highway=tertiary highway=tertiary_link switch isbike 1.0 1.6 ## increased from 1.4 to 1.6 switch highway=unclassified switch isbike 1.0 1.3 # # default for any other highway type not handled above # 2.0 ---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 bikeaccess 0 switch footaccess 100 1000000