From cc55b016e985c07c654c6c7aaf790e8361e0cb91 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Fri, 15 Feb 2013 17:02:49 +0100 Subject: [PATCH] don't push against oneway flow on roundabout. fixes #591 --- features/bicycle/pushing.feature | 6 ++++++ profiles/bicycle.lua | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/features/bicycle/pushing.feature b/features/bicycle/pushing.feature index 8e2ca3052..1c6919706 100644 --- a/features/bicycle/pushing.feature +++ b/features/bicycle/pushing.feature @@ -79,3 +79,9 @@ Feature: Bike - Accessability of different way types | construction | | | | | construction | yes | | | | construction | | yes | | + + @roundabout + Scenario: Bike - Don't push bikes against oneway flow on roundabouts + Then routability should be + | junction | forw | backw | + | roundabout | x | | diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 9e122c354..03ecb66e4 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -264,12 +264,14 @@ function way_function (way, numberOfNodesInWay) -- pushing bikes if bicycle_speeds[highway] or pedestrian_speeds[highway] then if foot ~= 'no' then - if way.direction == Way.oneway then - way.backward_speed = walking_speed - elseif way.direction == Way.opposite then - way.backward_speed = walking_speed - way.speed = way.speed - end + if junction ~= "roundabout" then + if way.direction == Way.oneway then + way.backward_speed = walking_speed + elseif way.direction == Way.opposite then + way.backward_speed = walking_speed + way.speed = way.speed + end + end end if way.backward_speed == way.speed then -- TODO: no way yet to mark a way as pedestrian mode if forward/backward speeds are equal