Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.21k stars 3.29k forks source link

Take roundabout properties into account in segregated intersection classification #5044

Open karenzshea opened 6 years ago

karenzshea commented 6 years ago

While debugging https://github.com/Project-OSRM/osrm-backend/issues/5039 I noticed that in a request like

curl 'localhost:5000/route/v1/car/171.13076090812683,-42.584583226690306;171.12908989191055,-42.58448843359357?steps=true'

image

when stepping through the steps vector in post-processing, the segment that enters the roundabout is classified as is_segregated

std::vector of length 8, capacity 14 = {{is_segregated = false, name = "Taramakau Highway", instruction = {type = 17 '\021', direction_modifier = 0 '\000'}}, {is_segregated = true, name = "Taramakau Highway", instruction = {type = 18 '\022', direction_modifier = 4 '\004'}}, {is_segregated = false, name = "Kumara Junction", instruction = {type = 12 '\f', direction_modifier = 5 '\005'}}, {is_segregated = false, name = "Kumara Junction", instruction = {type = 25 '\031', direction_modifier = 3 '\003'}}, ... }

@oxidase suggested that in segregated intersection classification a check that the segments are part of a rotary or roundabout could avoid misclassification here. The segment in this example above ^ is not technically part of the roundabout, but the following steps after it have roundabout instructions.

Questions

cc @dgearhart @kdiluca

dgearhart commented 6 years ago

@karenzshea @oxidase I believe this edge is not marked correctly - it should not be marked segregated. With the logic in place from #5040 it should not negatively impact directions for the 5.17 release. @dnesbitt61 was reviewing Valhalla classification. We should be able to make sure segregated edge does not intersect with roundabout

dnesbitt61 commented 6 years ago

Valhalla does not classify it as an internal intersection edge (not segregated) due to the outbound turn degree being classed as "nearly straight" - turn degree = 347. However, I would also agree that any edge that connects to a roundabout (either entering or exiting) should not be marked as segregated.

github-actions[bot] commented 3 weeks ago

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.