don't emit invalid turns when having u-turns on ferries
This commit is contained in:
parent
445225bf6d
commit
c7640903c3
@ -141,3 +141,22 @@ Feature: Collapse
|
|||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | cursed-island,beagle,forker,forker | depart,notification straight,turn straight,arrive |
|
| 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 |
|
| 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 |
|
||||||
|
@ -52,7 +52,7 @@ bool SuppressModeHandler::canProcess(const NodeID,
|
|||||||
Intersection SuppressModeHandler::
|
Intersection SuppressModeHandler::
|
||||||
operator()(const NodeID, const EdgeID, Intersection intersection) const
|
operator()(const NodeID, const EdgeID, Intersection intersection) const
|
||||||
{
|
{
|
||||||
const auto first = begin(intersection) + 1;
|
const auto first = begin(intersection);
|
||||||
const auto last = end(intersection);
|
const auto last = end(intersection);
|
||||||
|
|
||||||
std::for_each(first, last, [&](auto &road) {
|
std::for_each(first, last, [&](auto &road) {
|
||||||
|
Loading…
Reference in New Issue
Block a user