fix roundabout-intersection on immediate exit
This commit is contained in:
parent
38f5adbe5c
commit
861314256e
@ -23,6 +23,7 @@
|
||||
- Fixes a bug where a bearing range of zero would cause exhaustive graph traversals
|
||||
- Fixes a bug where certain looped geometries could cause an infinite loop during extraction
|
||||
- Fixed a bug where some roads could be falsly identified as sliproads
|
||||
- Fixed a bug where roundabout intersections could result in breaking assertions when immediately exited
|
||||
- Infrastructure:
|
||||
- Adds a feature to limit results in nearest service with a default of 100 in `osrm-routed`
|
||||
|
||||
|
@ -491,3 +491,23 @@ Feature: Basic Roundabout
|
||||
| h,a | gh,ab,ab | depart,roundabout turn left exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,roundabout turn straight exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,roundabout turn right exit-1,arrive |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/41.03275/-2.18990
|
||||
#at some point we probably want to recognise these situations and don't mention the roundabout at all here
|
||||
Scenario: Enter And Exit Throughabout
|
||||
Given the node map
|
||||
| | | | | | h | | | | |
|
||||
| | | | | | | | | | |
|
||||
| c | b | | d | | | | e | | f |
|
||||
| | | | | | | | | | |
|
||||
| | a | | | | g | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | junction | oneway |
|
||||
| dghd | tertiary_link | | roundabout | |
|
||||
| cbdef | trunk | through | | no |
|
||||
| ab | residential | in | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,turn right,roundabout turn straight exit-1,arrive | in,through,through,through |
|
||||
|
@ -113,7 +113,7 @@ inline bool entersRoundabout(const extractor::guidance::TurnInstruction instruct
|
||||
instruction.type == extractor::guidance::TurnType::EnterRoundaboutIntersectionAtExit ||
|
||||
instruction.type == extractor::guidance::TurnType::EnterAndExitRoundabout ||
|
||||
instruction.type == extractor::guidance::TurnType::EnterAndExitRotary ||
|
||||
instruction.type == extractor::guidance::TurnType::EnterAndExitRotary);
|
||||
instruction.type == extractor::guidance::TurnType::EnterAndExitRoundaboutIntersection);
|
||||
}
|
||||
|
||||
inline bool leavesRoundabout(const extractor::guidance::TurnInstruction instruction)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "engine/guidance/post_processing.hpp"
|
||||
#include "extractor/guidance/turn_instruction.hpp"
|
||||
#include "engine/guidance/post_processing.hpp"
|
||||
|
||||
#include "engine/guidance/assemble_steps.hpp"
|
||||
#include "engine/guidance/lane_processing.hpp"
|
||||
@ -203,6 +203,8 @@ bool setUpRoundabout(RouteStep &step)
|
||||
instruction.type == TurnType::EnterRoundaboutAtExit ||
|
||||
instruction.type == TurnType::EnterRoundaboutIntersectionAtExit)
|
||||
{
|
||||
// Here we consider an actual entry, not an exit. We simply have to count the additional
|
||||
// exit
|
||||
step.maneuver.exit = 1;
|
||||
// prevent futher special case handling of these two.
|
||||
if (instruction.type == TurnType::EnterRotaryAtExit)
|
||||
@ -215,6 +217,7 @@ bool setUpRoundabout(RouteStep &step)
|
||||
|
||||
if (leavesRoundabout(instruction))
|
||||
{
|
||||
// This set-up, even though it looks the same, is actually looking at entering AND exiting
|
||||
step.maneuver.exit = 1; // count the otherwise missing exit
|
||||
|
||||
// prevent futher special case handling of these two.
|
||||
|
Loading…
Reference in New Issue
Block a user