Daniel J. Hofmann
2016-11-24 13:08:49 +01:00
committed by Moritz Kobitzsch
parent 12d58ace10
commit fe5cc55b0e
5 changed files with 64 additions and 8 deletions
+7 -4
View File
@@ -221,9 +221,12 @@ function way_function (way, result)
end
-- roundabout handling
if junction and "roundabout" == junction then
if junction and ("roundabout" == junction) then
result.roundabout = true
end
if junction and ("circular" == junction) then
result.circular = true;
end
-- speed
local bridge_speed = bridge_speeds[bridge]
@@ -281,7 +284,7 @@ function way_function (way, result)
else
-- biking not allowed, maybe we can push our bike?
-- essentially requires pedestrian profiling, for example foot=no mean we can't push a bike
if foot ~= 'no' and junction ~= "roundabout" then
if foot ~= 'no' and (junction ~= "roundabout" and junction ~= "circular") then
if pedestrian_speeds[highway] then
-- pedestrian-only ways and areas
result.forward_speed = pedestrian_speeds[highway]
@@ -313,7 +316,7 @@ function way_function (way, result)
-- direction
local impliedOneway = false
if junction == "roundabout" or highway == "motorway" then
if junction == "roundabout" or junction == "circular" or highway == "motorway" then
impliedOneway = true
end
@@ -353,7 +356,7 @@ function way_function (way, result)
-- pushing bikes
if bicycle_speeds[highway] or pedestrian_speeds[highway] then
if foot ~= "no" and junction ~= "roundabout" then
if foot ~= "no" and junction ~= "roundabout" and junction ~= "circular" then
if result.backward_mode == mode.inaccessible then
result.backward_speed = walking_speed
result.backward_mode = mode.pushing_bike
+8 -2
View File
@@ -551,10 +551,16 @@ end
-- junctions
function handle_roundabouts(way,result)
if way:get_value_by_key("junction") == "roundabout" then
local junction = way:get_value_by_key("junction");
if junction == "roundabout" then
result.roundabout = true
end
if way:get_value_by_key("junction") == "circular" then
-- See Issue 3361: roundabout-shaped not following roundabout rules.
-- This will get us "At Strausberger Platz do Maneuver X" instead of multiple quick turns.
-- In a new API version we can think of having a separate type passing it through to the user.
if junction == "circular" then
result.circular = true
end
end
+4 -1
View File
@@ -156,10 +156,13 @@ function way_function (way, result)
result.ref = ref
end
-- roundabouts
-- roundabouts
if "roundabout" == junction then
result.roundabout = true
end
if "circular" == junction then
result.circular = true
end
-- speed
if route_speeds[route] then