diff --git a/features/guidance/roundabout.feature b/features/guidance/roundabout.feature index c744614ab..bd8c57ac0 100644 --- a/features/guidance/roundabout.feature +++ b/features/guidance/roundabout.feature @@ -492,3 +492,46 @@ Feature: Basic Roundabout When I route I should get | waypoints | route | turns | | e,h | left,right,right | depart,roundabout-exit-2,arrive | + + @3361 + Scenario: Bersarinplatz (Not a Roundabout) + Given the node map + """ + a n + + b m + + c l + + d e j k + + f h + + g i + """ + + And the ways + | nodes | junction | name | ref | highway | oneway | + | ab | | Petersburger Strasse | B 96a | primary | yes | + | bc | circular | Bersarinplatz | B 96a | primary | | + | ce | circular | Bersarinplatz | B 96a | primary | | + | ed | | Weidenweg | | residential | | + | ef | circular | Bersarinplatz | B 96a | primary | | + | fg | | Petersburger Strasse | B 96a | primary | yes | + | fh | circular | Bersarinplatz | | secondary | | + | ih | | Petersburger Strasse | B 96a | primary | yes | + | hj | circular | Bersarinplatz | | secondary | | + | jk | | Rigaer Strasse | | residential | | + | jl | circular | Bersarinplatz | | secondary | | + | lm | circular | Bersarinplatz | | secondary | | + | mb | circular | Bersarinplatz | | secondary | | + | mn | | Petersburger Strasse | B 96a | primary | yes | + + When I route I should get + | waypoints | route | turns | + | a,g | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-2,arrive | + | d,g | Weidenweg,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-1,arrive | + | i,k | Petersburger Strasse,Rigaer Strasse,Rigaer Strasse | depart,Bersarinplatz-exit-1,arrive | + | i,n | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-2,arrive | + | i,d | Petersburger Strasse,Weidenweg,Weidenweg | depart,Bersarinplatz-exit-3,arrive | + | i,g | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-4,arrive | diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 095976530..5da713a00 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -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 diff --git a/profiles/car.lua b/profiles/car.lua index 0ac74a051..1d548d19a 100644 --- a/profiles/car.lua +++ b/profiles/car.lua @@ -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 diff --git a/profiles/foot.lua b/profiles/foot.lua index 7a5df36df..22104008c 100644 --- a/profiles/foot.lua +++ b/profiles/foot.lua @@ -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 diff --git a/taginfo.json b/taginfo.json index 2ee0214cf..035dcdb2b 100644 --- a/taginfo.json +++ b/taginfo.json @@ -353,7 +353,8 @@ { "key": "junction", "object_types": [ "way" ], - "value": "circular" + "value": "circular", + "description": "A Roundabout where the traffic on the roundabout not always has right of way." }, { "key": "type",