diff --git a/features/guidance/collapse-ferry.feature b/features/guidance/collapse-ferry.feature index ee2aedf0b..f0a99ed38 100644 --- a/features/guidance/collapse-ferry.feature +++ b/features/guidance/collapse-ferry.feature @@ -141,3 +141,22 @@ Feature: Collapse | waypoints | route | turns | | a,d | cursed-island,beagle,forker,forker | depart,notification straight,turn straight,arrive | | a,e | cursed-island,beagle,screw-me-not,screw-me-not | depart,notification straight,turn straight,arrive | + + @uturn @dead-end @ferry @via + Scenario: U-Turn on a dead-end ferry + Given the node map + """ + a - 1 - b ~ ~ ~ ~ ~ ~ ~ c + """ + + And the ways + | nodes | highway | route | name | + | ab | primary | | land | + | bc | | ferry | sea | + + # we actually cannot check the route here, since two possible routes are equally valid: + # (ab)(bcb1) and (abcb)(b1) are exactly the same. Luckily, we only want to check for + # not asserting here. + When I route I should get + | waypoints | + | a,b,1 | diff --git a/src/extractor/guidance/suppress_mode_handler.cpp b/src/extractor/guidance/suppress_mode_handler.cpp index ede670e0f..54b9bdca1 100644 --- a/src/extractor/guidance/suppress_mode_handler.cpp +++ b/src/extractor/guidance/suppress_mode_handler.cpp @@ -52,7 +52,7 @@ bool SuppressModeHandler::canProcess(const NodeID, Intersection SuppressModeHandler:: operator()(const NodeID, const EdgeID, Intersection intersection) const { - const auto first = begin(intersection) + 1; + const auto first = begin(intersection); const auto last = end(intersection); std::for_each(first, last, [&](auto &road) {