Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e0b8e43d0 | |||
| 43e67241a0 | |||
| 217d2afbb4 | |||
| 6e9bb4ad75 | |||
| 165dba8fcc | |||
| 2bd511f194 | |||
| 2d5ef1f4cf | |||
| 76457a423f | |||
| 9ec4348bd1 | |||
| 309d00c5e3 | |||
| effc85fa07 | |||
| e0eedbc5f6 | |||
| 655d03592f |
@@ -1,3 +1,12 @@
|
|||||||
|
# 5.8.1
|
||||||
|
- Changes from 5.8.0:
|
||||||
|
- Bugfixes:
|
||||||
|
- Fixes #4152: Superflous turn left instruction, when crossing a service-road.
|
||||||
|
- Fixes #4189: Fixes missing turn lane information after a traffic light.
|
||||||
|
- Fixes #4199: Data race-condition when updating segment speeds.
|
||||||
|
- Fixes #3987: Fixes obvious turn detection at T-intersections with slip-roads.
|
||||||
|
- Fixes #4161: Don't collapse U-Turns with other steps.
|
||||||
|
|
||||||
# 5.8.0
|
# 5.8.0
|
||||||
- Changes from 5.7
|
- Changes from 5.7
|
||||||
- API:
|
- API:
|
||||||
@@ -26,6 +35,7 @@
|
|||||||
- Fixed a copy/paste issue assigning wrong directions in similar turns (left over right)
|
- Fixed a copy/paste issue assigning wrong directions in similar turns (left over right)
|
||||||
- #4074: fixed a bug that would announce entering highway ramps as u-turns
|
- #4074: fixed a bug that would announce entering highway ramps as u-turns
|
||||||
- #4122: osrm-routed/libosrm should throw exception when a dataset incompatible with the requested algorithm is loaded
|
- #4122: osrm-routed/libosrm should throw exception when a dataset incompatible with the requested algorithm is loaded
|
||||||
|
- Avoid collapsing u-turns into combined turn instructions
|
||||||
|
|
||||||
# 5.7.1
|
# 5.7.1
|
||||||
- Bugfixes
|
- Bugfixes
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ endif()
|
|||||||
project(OSRM C CXX)
|
project(OSRM C CXX)
|
||||||
set(OSRM_VERSION_MAJOR 5)
|
set(OSRM_VERSION_MAJOR 5)
|
||||||
set(OSRM_VERSION_MINOR 8)
|
set(OSRM_VERSION_MINOR 8)
|
||||||
set(OSRM_VERSION_PATCH 0)
|
set(OSRM_VERSION_PATCH 1)
|
||||||
set(OSRM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
|
set(OSRM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
|
||||||
|
|
||||||
add_definitions(-DOSRM_PROJECT_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
add_definitions(-DOSRM_PROJECT_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ Feature: Turn Lane Guidance
|
|||||||
| restriction | bc | cd | c | no_right_turn |
|
| restriction | bc | cd | c | no_right_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false, |
|
||||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true, |
|
||||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
| a,f | in,cross,cross | depart,continue right,arrive | ,, |
|
||||||
|
|
||||||
@sliproads
|
@sliproads
|
||||||
Scenario: Separate Turn Lanes
|
Scenario: Separate Turn Lanes
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ Feature: Collapse
|
|||||||
| a,g | first,second,second | depart,turn left,arrive | a,b,g |
|
| a,g | first,second,second | depart,turn left,arrive | a,b,g |
|
||||||
| d,g | first,second,second | depart,turn right,arrive | d,e,g |
|
| d,g | first,second,second | depart,turn right,arrive | d,e,g |
|
||||||
| g,f | second,first,first | depart,turn right,arrive | g,e,f |
|
| g,f | second,first,first | depart,turn right,arrive | g,e,f |
|
||||||
| g,c | second,first,first | depart,end of road left,arrive | g,b,c |
|
| g,c | second,first,first | depart,turn left,arrive | g,e,c |
|
||||||
|
|
||||||
Scenario: Do not collapse turning roads
|
Scenario: Do not collapse turning roads
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -399,7 +399,7 @@ Feature: Collapse
|
|||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | , | depart,arrive |
|
| a,d | , | depart,arrive |
|
||||||
|
|
||||||
# This scenario could be considered to require a `turn left`. The danger to create random/unwanted instructions
|
# This scenario could be considered to require a `turn left`. The danger to create random/unwanted instructions
|
||||||
# from a setting like this are just to big, though. Therefore I opted to use `depart,arrive` only
|
# from a setting like this are just to big, though. Therefore I opted to use `depart,arrive` only
|
||||||
Scenario: Crossing Bridge into Segregated Turn
|
Scenario: Crossing Bridge into Segregated Turn
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -690,9 +690,9 @@ Feature: Collapse
|
|||||||
| restriction | bc | dc | c | no_right_turn |
|
| restriction | bc | dc | c | no_right_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
|
| a,g | road,road,cross,cross | depart,continue slight left,turn left,arrive | a,b,c,g |
|
||||||
| a,e | road,road | depart,arrive | a,e |
|
| a,e | road,road | depart,arrive | a,e |
|
||||||
|
|
||||||
Scenario: On-Off on Highway
|
Scenario: On-Off on Highway
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -996,8 +996,8 @@ Feature: Collapse
|
|||||||
a . . b .'
|
a . . b .'
|
||||||
` d.
|
` d.
|
||||||
f e
|
f e
|
||||||
"""
|
"""
|
||||||
#Check collapse.detail for a similar case (shorter) that does not classify these turns as a sliproad anymore
|
#Check collapse.detail for a similar case (shorter) that does not classify these turns as a sliproad anymore
|
||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
| nodes | name | oneway | highway |
|
| nodes | name | oneway | highway |
|
||||||
@@ -1016,9 +1016,9 @@ Feature: Collapse
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| a,g | road,cross,cross | depart,fork left,arrive | a,b,g |
|
| a,g | road,road,cross,cross | depart,fork slight left,turn left,arrive | a,b,c,g |
|
||||||
| a,e | road,road,road | depart,fork slight right,arrive | a,b,e |
|
| a,e | road,road,road | depart,fork slight right,arrive | a,b,e |
|
||||||
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive | a,b,d,f |
|
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive | a,b,d,f |
|
||||||
|
|
||||||
|
|
||||||
# http://www.openstreetmap.org/way/92415447 #3933
|
# http://www.openstreetmap.org/way/92415447 #3933
|
||||||
@@ -1055,3 +1055,22 @@ Feature: Collapse
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| a,i | President Avenue,Princes Highway,Princes Highway | depart,turn left,arrive | a,b,i |
|
| a,i | President Avenue,Princes Highway,Princes Highway | depart,turn left,arrive | a,b,i |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Don't combine uturns
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
2 d
|
||||||
|
a - - b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c
|
||||||
|
1
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| ab | tertiary |
|
||||||
|
| bc | tertiary |
|
||||||
|
| bd | service |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | bearings | route | turns | locations |
|
||||||
|
| 1,2 | 90 270 | ab,bd,bd,ab,ab | depart,turn left,continue uturn,turn right,arrive | _,b,d,b,_ |
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
@driveway @guidance
|
||||||
|
Feature: Driveways intersections
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "car"
|
||||||
|
Given a grid size of 5 meters
|
||||||
|
|
||||||
|
Scenario: Road with a turn to service road
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a
|
||||||
|
~.
|
||||||
|
b----c----d
|
||||||
|
|
|
||||||
|
e
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | oneway |
|
||||||
|
| abc | trunk | first | yes |
|
||||||
|
| cd | trunk | second | yes |
|
||||||
|
| be | service | parking | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | locations |
|
||||||
|
| a,d | first,second | depart,arrive | a,d |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Turn Instead of Ramp
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a
|
||||||
|
~.
|
||||||
|
b----c----d
|
||||||
|
|
|
||||||
|
e
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | oneway |
|
||||||
|
| ab | trunk | | yes |
|
||||||
|
| bc | trunk | | yes |
|
||||||
|
| cd | trunk | second | yes |
|
||||||
|
| be | service | parking | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | locations |
|
||||||
|
| a,d | ,second | depart,arrive | a,d |
|
||||||
@@ -201,14 +201,14 @@ Feature: Simple Turns
|
|||||||
| ef | residential | road | 2 | yes |
|
| ef | residential | road | 2 | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| a,c | road,road | depart,arrive | a,c |
|
| a,c | road,road | depart,arrive | a,c |
|
||||||
| c,a | road,road | depart,arrive | c,a |
|
| c,a | road,road | depart,arrive | c,a |
|
||||||
| g,a | turn,road,road | depart,turn left,arrive | g,b,a |
|
| g,a | turn,road,road | depart,turn left,arrive | g,b,a |
|
||||||
| g,c | turn,road,road | depart,turn right,arrive | g,b,c |
|
| g,c | turn,road,road | depart,turn right,arrive | g,b,c |
|
||||||
| g,f | turn,road,road | depart,turn left,arrive | g,e,f |
|
| g,f | turn,road,road | depart,end of road left,arrive | g,e,f |
|
||||||
| c,f | road,road,road | depart,continue right,arrive | c,b,f |
|
| c,f | road,road,road | depart,turn right,arrive | c,b,f |
|
||||||
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
|
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
|
||||||
|
|
||||||
# http://www.openstreetmap.org/#map=19/52.48753/13.52838
|
# http://www.openstreetmap.org/#map=19/52.48753/13.52838
|
||||||
Scenario: Traffic Circle
|
Scenario: Traffic Circle
|
||||||
@@ -1312,8 +1312,8 @@ Feature: Simple Turns
|
|||||||
|
|
||||||
# we don't care for turn instructions, this is a coordinate extraction bug check
|
# we don't care for turn instructions, this is a coordinate extraction bug check
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | intersections |
|
| waypoints | route | intersections |
|
||||||
| a,g | ab,bcdefgh | true:90,true:45 false:180 false:270;true:180 |
|
| a,g | ab,bcdefgh,bcdefgh | true:90;true:45 false:180 false:270;true:180 |
|
||||||
|
|
||||||
#https://github.com/Project-OSRM/osrm-backend/pull/3469#issuecomment-270806580
|
#https://github.com/Project-OSRM/osrm-backend/pull/3469#issuecomment-270806580
|
||||||
Scenario: Oszillating Lower Priority Road
|
Scenario: Oszillating Lower Priority Road
|
||||||
|
|||||||
@@ -1215,3 +1215,32 @@ Feature: Turn Lane Guidance
|
|||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,d | road,cross,cross | depart,turn left,arrive | ,none:true none:false right:false, |
|
| a,d | road,cross,cross | depart,turn left,arrive | ,none:true none:false right:false, |
|
||||||
| a,c | road,road | depart,arrive | , |
|
| a,c | road,road | depart,arrive | , |
|
||||||
|
|
||||||
|
@4189
|
||||||
|
Scenario: U-turn after a traffic light
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
j k
|
||||||
|
: :
|
||||||
|
f---g-h-i
|
||||||
|
: :
|
||||||
|
a-b-c-d-e
|
||||||
|
: :
|
||||||
|
l m
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| b | traffic_signals |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | lanes | turn:lanes | oneway |
|
||||||
|
| ab | road1 | 3 | left\|through\|through;right | yes |
|
||||||
|
| bcde | road1 | 2 | | yes |
|
||||||
|
| ihgf | road1 | 2 | | yes |
|
||||||
|
| jgcl | road2 | 2 | | yes |
|
||||||
|
| mdhk | road2 | 2 | | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | lanes | locations |
|
||||||
|
| a,f | road1,road1,road1 | depart,continue uturn,arrive | ,left:true straight:false straight;right:false, | a,d,f |
|
||||||
|
|||||||
@@ -1319,3 +1319,33 @@ Feature: Simple Turns
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | ref | turns |
|
| waypoints | route | ref | turns |
|
||||||
| a,h | Road,,, | C 42,,C 42,C 42 | depart,on ramp right,merge slight left,arrive |
|
| a,h | Road,,, | C 42,,C 42,C 42 | depart,on ramp right,merge slight left,arrive |
|
||||||
|
|
||||||
|
Scenario: End of road, T-intersection, no obvious turn, only one road allowed
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
d
|
||||||
|
.
|
||||||
|
a . b . . c
|
||||||
|
' .
|
||||||
|
'e
|
||||||
|
.
|
||||||
|
f
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | oneway | ref |
|
||||||
|
| ab | primary | | B 191 |
|
||||||
|
| bc | primary | | B 191 |
|
||||||
|
| be | primary_link | yes | |
|
||||||
|
| dc | primary | | B 4;B 191 |
|
||||||
|
| ce | primary | | B 4 |
|
||||||
|
| ef | primary | | B 4 |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:to | node:via | restriction |
|
||||||
|
| restriction | bc | ce | c | no_right_turn |
|
||||||
|
| restriction | be | ef | e | only_right_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| a,d | ab,dc,dc | depart,turn left,arrive |
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#ifndef OSRM_EXTRACTOR_GUIDANCE_DRIVEWAY_HANDLER_HPP
|
||||||
|
#define OSRM_EXTRACTOR_GUIDANCE_DRIVEWAY_HANDLER_HPP
|
||||||
|
|
||||||
|
#include "extractor/guidance/intersection_handler.hpp"
|
||||||
|
|
||||||
|
namespace osrm
|
||||||
|
{
|
||||||
|
namespace extractor
|
||||||
|
{
|
||||||
|
namespace guidance
|
||||||
|
{
|
||||||
|
|
||||||
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
|
class DrivewayHandler final : public IntersectionHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DrivewayHandler(const IntersectionGenerator &intersection_generator,
|
||||||
|
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||||
|
const std::vector<util::Coordinate> &coordinates,
|
||||||
|
const util::NameTable &name_table,
|
||||||
|
const SuffixTable &street_name_suffix_table);
|
||||||
|
|
||||||
|
~DrivewayHandler() override final = default;
|
||||||
|
|
||||||
|
// check whether the handler can actually handle the intersection
|
||||||
|
bool canProcess(const NodeID nid,
|
||||||
|
const EdgeID via_eid,
|
||||||
|
const Intersection &intersection) const override final;
|
||||||
|
|
||||||
|
// process the intersection
|
||||||
|
Intersection operator()(const NodeID nid,
|
||||||
|
const EdgeID via_eid,
|
||||||
|
Intersection intersection) const override final;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace guidance
|
||||||
|
} // namespace extractor
|
||||||
|
} // namespace osrm
|
||||||
|
|
||||||
|
#endif /* OSRM_EXTRACTOR_GUIDANCE_DRIVEWAY_HANDLER_HPP */
|
||||||
@@ -27,7 +27,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
// They assign appropriate turn operations to the TurnOperations.
|
|
||||||
// This base class provides both the interface and implementations for
|
// This base class provides both the interface and implementations for
|
||||||
// common functions.
|
// common functions.
|
||||||
class IntersectionHandler
|
class IntersectionHandler
|
||||||
@@ -114,6 +113,8 @@ class IntersectionHandler
|
|||||||
// For this scenario returns intersection at `b` and `b`.
|
// For this scenario returns intersection at `b` and `b`.
|
||||||
boost::optional<IntersectionHandler::IntersectionViewAndNode>
|
boost::optional<IntersectionHandler::IntersectionViewAndNode>
|
||||||
getNextIntersection(const NodeID at, const EdgeID via) const;
|
getNextIntersection(const NodeID at, const EdgeID via) const;
|
||||||
|
|
||||||
|
bool isSameName(const EdgeID source_edge_id, const EdgeID target_edge_id) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Impl.
|
// Impl.
|
||||||
@@ -410,14 +411,11 @@ std::size_t IntersectionHandler::findObviousTurn(const EdgeID via_edge,
|
|||||||
const auto &best_option_data =
|
const auto &best_option_data =
|
||||||
node_based_graph.GetEdgeData(intersection[best_option].eid);
|
node_based_graph.GetEdgeData(intersection[best_option].eid);
|
||||||
const auto adjusted_distinction_ratio = [&]() {
|
const auto adjusted_distinction_ratio = [&]() {
|
||||||
// not allowed competitors are easily distinct
|
// obviousness by road classes
|
||||||
if (!intersection[index].entry_allowed)
|
if (in_way_data.road_classification == best_option_data.road_classification &&
|
||||||
return 0.7 * DISTINCTION_RATIO;
|
best_option_data.road_classification.GetPriority() <
|
||||||
// a bit less obvious are road classes
|
node_based_graph.GetEdgeData(intersection[index].eid)
|
||||||
else if (in_way_data.road_classification == best_option_data.road_classification &&
|
.road_classification.GetPriority())
|
||||||
best_option_data.road_classification.GetPriority() <
|
|
||||||
node_based_graph.GetEdgeData(intersection[index].eid)
|
|
||||||
.road_classification.GetPriority())
|
|
||||||
return 0.8 * DISTINCTION_RATIO;
|
return 0.8 * DISTINCTION_RATIO;
|
||||||
// if road classes are the same, we use the full ratio
|
// if road classes are the same, we use the full ratio
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
// They assign appropriate turn operations to the TurnOperations.
|
|
||||||
class MotorwayHandler : public IntersectionHandler
|
class MotorwayHandler : public IntersectionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
// They assign appropriate turn operations to the TurnOperations.
|
|
||||||
class SliproadHandler final : public IntersectionHandler
|
class SliproadHandler final : public IntersectionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#define OSRM_EXTRACTOR_TURN_ANALYSIS
|
#define OSRM_EXTRACTOR_TURN_ANALYSIS
|
||||||
|
|
||||||
#include "extractor/compressed_edge_container.hpp"
|
#include "extractor/compressed_edge_container.hpp"
|
||||||
|
#include "extractor/guidance/driveway_handler.hpp"
|
||||||
#include "extractor/guidance/intersection.hpp"
|
#include "extractor/guidance/intersection.hpp"
|
||||||
#include "extractor/guidance/intersection_generator.hpp"
|
#include "extractor/guidance/intersection_generator.hpp"
|
||||||
#include "extractor/guidance/intersection_normalization_operation.hpp"
|
#include "extractor/guidance/intersection_normalization_operation.hpp"
|
||||||
@@ -87,6 +88,7 @@ class TurnAnalysis
|
|||||||
const TurnHandler turn_handler;
|
const TurnHandler turn_handler;
|
||||||
const SliproadHandler sliproad_handler;
|
const SliproadHandler sliproad_handler;
|
||||||
const SuppressModeHandler suppress_mode_handler;
|
const SuppressModeHandler suppress_mode_handler;
|
||||||
|
const DrivewayHandler driveway_handler;
|
||||||
|
|
||||||
// Utility function, setting basic turn types. Prepares for normal turn handling.
|
// Utility function, setting basic turn types. Prepares for normal turn handling.
|
||||||
Intersection
|
Intersection
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
// They assign appropriate turn operations to the TurnOperations.
|
|
||||||
class TurnHandler : public IntersectionHandler
|
class TurnHandler : public IntersectionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <boost/iterator/iterator_facade.hpp>
|
#include <boost/iterator/iterator_facade.hpp>
|
||||||
#include <boost/iterator/reverse_iterator.hpp>
|
#include <boost/iterator/reverse_iterator.hpp>
|
||||||
|
#include <tbb/atomic.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@@ -348,7 +349,7 @@ template <typename T, std::size_t Bits, storage::Ownership Ownership> class Pack
|
|||||||
fill(initial_value);
|
fill(initial_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
PackedVector(util::ViewOrVector<std::uint64_t, Ownership> vec_, std::size_t num_elements)
|
PackedVector(util::ViewOrVector<WordT, Ownership> vec_, std::size_t num_elements)
|
||||||
: vec(std::move(vec_)), num_elements(num_elements)
|
: vec(std::move(vec_)), num_elements(num_elements)
|
||||||
{
|
{
|
||||||
initialize();
|
initialize();
|
||||||
@@ -497,20 +498,39 @@ template <typename T, std::size_t Bits, storage::Ownership Ownership> class Pack
|
|||||||
|
|
||||||
inline void set_value(const InternalIndex internal_index, const T value)
|
inline void set_value(const InternalIndex internal_index, const T value)
|
||||||
{
|
{
|
||||||
|
// ⚠ The method uses CAS spinlocks to prevent data races in parallel calls
|
||||||
|
// TBB internal atomic's are used for CAS on non-atomic data
|
||||||
|
// Parallel read and write access is not allowed
|
||||||
|
|
||||||
auto &lower_word = vec[internal_index.lower_word];
|
auto &lower_word = vec[internal_index.lower_word];
|
||||||
auto &upper_word = vec[internal_index.lower_word + 1];
|
auto &upper_word = vec[internal_index.lower_word + 1];
|
||||||
|
|
||||||
lower_word = set_lower_value<WordT, T>(lower_word,
|
// Lock-free update of the lower word
|
||||||
lower_mask[internal_index.element],
|
WordT local_lower_word, new_lower_word;
|
||||||
lower_offset[internal_index.element],
|
do
|
||||||
value);
|
{
|
||||||
upper_word = set_upper_value<WordT, T>(upper_word,
|
local_lower_word = lower_word;
|
||||||
upper_mask[internal_index.element],
|
new_lower_word = set_lower_value<WordT, T>(local_lower_word,
|
||||||
upper_offset[internal_index.element],
|
lower_mask[internal_index.element],
|
||||||
value);
|
lower_offset[internal_index.element],
|
||||||
|
value);
|
||||||
|
} while (tbb::internal::as_atomic(lower_word)
|
||||||
|
.compare_and_swap(new_lower_word, local_lower_word) != local_lower_word);
|
||||||
|
|
||||||
|
// Lock-free update of the upper word
|
||||||
|
WordT local_upper_word, new_upper_word;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
local_upper_word = upper_word;
|
||||||
|
new_upper_word = set_upper_value<WordT, T>(local_upper_word,
|
||||||
|
upper_mask[internal_index.element],
|
||||||
|
upper_offset[internal_index.element],
|
||||||
|
value);
|
||||||
|
} while (tbb::internal::as_atomic(upper_word)
|
||||||
|
.compare_and_swap(new_upper_word, local_upper_word) != local_upper_word);
|
||||||
}
|
}
|
||||||
|
|
||||||
util::ViewOrVector<std::uint64_t, Ownership> vec;
|
util::ViewOrVector<WordT, Ownership> vec;
|
||||||
std::uint64_t num_elements = 0;
|
std::uint64_t num_elements = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "osrm",
|
"name": "osrm",
|
||||||
"version": "5.8.0",
|
"version": "5.8.1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
|
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -61,6 +61,22 @@ bool isShortAndUndisturbed(const RouteStep &step)
|
|||||||
return is_short && noIntermediaryIntersections(step);
|
return is_short && noIntermediaryIntersections(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On dual carriageways, we might want to use u-turns in combination with new-name instructions.
|
||||||
|
// Otherwise a u-turn should never be part of a collapsing instructions.
|
||||||
|
bool noBadUTurnCombination(const RouteStepIterator first, const RouteStepIterator second)
|
||||||
|
{
|
||||||
|
auto has_uturn = hasModifier(*first, DirectionModifier::UTurn) ||
|
||||||
|
hasModifier(*second, DirectionModifier::UTurn);
|
||||||
|
|
||||||
|
auto const from_name_change_into_uturn =
|
||||||
|
hasTurnType(*first, TurnType::NewName) && hasModifier(*second, DirectionModifier::UTurn);
|
||||||
|
|
||||||
|
auto const uturn_into_name_change =
|
||||||
|
hasTurnType(*second, TurnType::NewName) && hasModifier(*first, DirectionModifier::UTurn);
|
||||||
|
|
||||||
|
return !has_uturn || from_name_change_into_uturn || uturn_into_name_change;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
bool basicCollapsePreconditions(const RouteStepIterator first, const RouteStepIterator second)
|
bool basicCollapsePreconditions(const RouteStepIterator first, const RouteStepIterator second)
|
||||||
@@ -70,7 +86,10 @@ bool basicCollapsePreconditions(const RouteStepIterator first, const RouteStepIt
|
|||||||
|
|
||||||
const auto waypoint_type = hasWaypointType(*first) || hasWaypointType(*second);
|
const auto waypoint_type = hasWaypointType(*first) || hasWaypointType(*second);
|
||||||
|
|
||||||
return !has_roundabout_type && !waypoint_type && haveSameMode(*first, *second);
|
const auto contains_bad_uturn = !noBadUTurnCombination(first, second);
|
||||||
|
|
||||||
|
return !has_roundabout_type && !waypoint_type && haveSameMode(*first, *second) &&
|
||||||
|
!contains_bad_uturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool basicCollapsePreconditions(const RouteStepIterator first,
|
bool basicCollapsePreconditions(const RouteStepIterator first,
|
||||||
@@ -81,8 +100,11 @@ bool basicCollapsePreconditions(const RouteStepIterator first,
|
|||||||
hasRoundaboutType(second->maneuver.instruction) ||
|
hasRoundaboutType(second->maneuver.instruction) ||
|
||||||
hasRoundaboutType(third->maneuver.instruction);
|
hasRoundaboutType(third->maneuver.instruction);
|
||||||
|
|
||||||
|
const auto contains_bad_uturn =
|
||||||
|
!noBadUTurnCombination(first, second) && !noBadUTurnCombination(second, third);
|
||||||
|
|
||||||
// require modes to match up
|
// require modes to match up
|
||||||
return !has_roundabout_type && haveSameMode(*first, *second, *third);
|
return !has_roundabout_type && haveSameMode(*first, *second, *third) && !contains_bad_uturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isStaggeredIntersection(const RouteStepIterator step_prior_to_intersection,
|
bool isStaggeredIntersection(const RouteStepIterator step_prior_to_intersection,
|
||||||
|
|||||||
@@ -111,43 +111,6 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
|||||||
BOOST_ASSERT(graph.GetEdgeData(forward_e2).name_id ==
|
BOOST_ASSERT(graph.GetEdgeData(forward_e2).name_id ==
|
||||||
graph.GetEdgeData(reverse_e2).name_id);
|
graph.GetEdgeData(reverse_e2).name_id);
|
||||||
|
|
||||||
// Do not compress edge if it crosses a traffic signal.
|
|
||||||
// This can't be done in CanCombineWith, becase we only store the
|
|
||||||
// traffic signals in the `traffic_lights` list, which EdgeData
|
|
||||||
// doesn't have access to.
|
|
||||||
const bool has_node_penalty = traffic_lights.find(node_v) != traffic_lights.end();
|
|
||||||
if (has_node_penalty)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Get weights before graph is modified
|
|
||||||
const auto forward_weight1 = fwd_edge_data1.weight;
|
|
||||||
const auto forward_weight2 = fwd_edge_data2.weight;
|
|
||||||
const auto forward_duration1 = fwd_edge_data1.duration;
|
|
||||||
const auto forward_duration2 = fwd_edge_data2.duration;
|
|
||||||
|
|
||||||
BOOST_ASSERT(0 != forward_weight1);
|
|
||||||
BOOST_ASSERT(0 != forward_weight2);
|
|
||||||
|
|
||||||
const auto reverse_weight1 = rev_edge_data1.weight;
|
|
||||||
const auto reverse_weight2 = rev_edge_data2.weight;
|
|
||||||
const auto reverse_duration1 = rev_edge_data1.duration;
|
|
||||||
const auto reverse_duration2 = rev_edge_data2.duration;
|
|
||||||
|
|
||||||
BOOST_ASSERT(0 != reverse_weight1);
|
|
||||||
BOOST_ASSERT(0 != reverse_weight2);
|
|
||||||
|
|
||||||
// add weight of e2's to e1
|
|
||||||
graph.GetEdgeData(forward_e1).weight += forward_weight2;
|
|
||||||
graph.GetEdgeData(reverse_e1).weight += reverse_weight2;
|
|
||||||
|
|
||||||
// add duration of e2's to e1
|
|
||||||
graph.GetEdgeData(forward_e1).duration += forward_duration2;
|
|
||||||
graph.GetEdgeData(reverse_e1).duration += reverse_duration2;
|
|
||||||
|
|
||||||
// extend e1's to targets of e2's
|
|
||||||
graph.SetTarget(forward_e1, node_w);
|
|
||||||
graph.SetTarget(reverse_e1, node_u);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remember Lane Data for compressed parts. This handles scenarios where lane-data
|
* Remember Lane Data for compressed parts. This handles scenarios where lane-data
|
||||||
* is
|
* is
|
||||||
@@ -185,12 +148,51 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
|||||||
return front;
|
return front;
|
||||||
return back;
|
return back;
|
||||||
};
|
};
|
||||||
graph.GetEdgeData(forward_e1).lane_description_id =
|
graph.GetEdgeData(forward_e1).lane_description_id = selectLaneID(
|
||||||
selectLaneID(graph.GetEdgeData(forward_e1).lane_description_id,
|
fwd_edge_data1.lane_description_id, fwd_edge_data2.lane_description_id);
|
||||||
fwd_edge_data2.lane_description_id);
|
graph.GetEdgeData(reverse_e1).lane_description_id = selectLaneID(
|
||||||
graph.GetEdgeData(reverse_e1).lane_description_id =
|
rev_edge_data1.lane_description_id, rev_edge_data2.lane_description_id);
|
||||||
selectLaneID(graph.GetEdgeData(reverse_e1).lane_description_id,
|
graph.GetEdgeData(forward_e2).lane_description_id = selectLaneID(
|
||||||
rev_edge_data2.lane_description_id);
|
fwd_edge_data2.lane_description_id, fwd_edge_data1.lane_description_id);
|
||||||
|
graph.GetEdgeData(reverse_e2).lane_description_id = selectLaneID(
|
||||||
|
rev_edge_data2.lane_description_id, rev_edge_data1.lane_description_id);
|
||||||
|
|
||||||
|
// Do not compress edge if it crosses a traffic signal.
|
||||||
|
// This can't be done in CanCombineWith, becase we only store the
|
||||||
|
// traffic signals in the `traffic_lights` list, which EdgeData
|
||||||
|
// doesn't have access to.
|
||||||
|
const bool has_node_penalty = traffic_lights.find(node_v) != traffic_lights.end();
|
||||||
|
if (has_node_penalty)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Get weights before graph is modified
|
||||||
|
const auto forward_weight1 = fwd_edge_data1.weight;
|
||||||
|
const auto forward_weight2 = fwd_edge_data2.weight;
|
||||||
|
const auto forward_duration1 = fwd_edge_data1.duration;
|
||||||
|
const auto forward_duration2 = fwd_edge_data2.duration;
|
||||||
|
|
||||||
|
BOOST_ASSERT(0 != forward_weight1);
|
||||||
|
BOOST_ASSERT(0 != forward_weight2);
|
||||||
|
|
||||||
|
const auto reverse_weight1 = rev_edge_data1.weight;
|
||||||
|
const auto reverse_weight2 = rev_edge_data2.weight;
|
||||||
|
const auto reverse_duration1 = rev_edge_data1.duration;
|
||||||
|
const auto reverse_duration2 = rev_edge_data2.duration;
|
||||||
|
|
||||||
|
BOOST_ASSERT(0 != reverse_weight1);
|
||||||
|
BOOST_ASSERT(0 != reverse_weight2);
|
||||||
|
|
||||||
|
// add weight of e2's to e1
|
||||||
|
graph.GetEdgeData(forward_e1).weight += forward_weight2;
|
||||||
|
graph.GetEdgeData(reverse_e1).weight += reverse_weight2;
|
||||||
|
|
||||||
|
// add duration of e2's to e1
|
||||||
|
graph.GetEdgeData(forward_e1).duration += forward_duration2;
|
||||||
|
graph.GetEdgeData(reverse_e1).duration += reverse_duration2;
|
||||||
|
|
||||||
|
// extend e1's to targets of e2's
|
||||||
|
graph.SetTarget(forward_e1, node_w);
|
||||||
|
graph.SetTarget(reverse_e1, node_u);
|
||||||
|
|
||||||
// remove e2's (if bidir, otherwise only one)
|
// remove e2's (if bidir, otherwise only one)
|
||||||
graph.DeleteEdge(node_v, forward_e2);
|
graph.DeleteEdge(node_v, forward_e2);
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
#include "extractor/guidance/driveway_handler.hpp"
|
||||||
|
|
||||||
|
#include "util/assert.hpp"
|
||||||
|
|
||||||
|
using osrm::extractor::guidance::getTurnDirection;
|
||||||
|
using osrm::util::angularDeviation;
|
||||||
|
|
||||||
|
namespace osrm
|
||||||
|
{
|
||||||
|
namespace extractor
|
||||||
|
{
|
||||||
|
namespace guidance
|
||||||
|
{
|
||||||
|
|
||||||
|
DrivewayHandler::DrivewayHandler(const IntersectionGenerator &intersection_generator,
|
||||||
|
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||||
|
const std::vector<util::Coordinate> &coordinates,
|
||||||
|
const util::NameTable &name_table,
|
||||||
|
const SuffixTable &street_name_suffix_table)
|
||||||
|
: IntersectionHandler(node_based_graph,
|
||||||
|
coordinates,
|
||||||
|
name_table,
|
||||||
|
street_name_suffix_table,
|
||||||
|
intersection_generator)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// The intersection without major roads needs to pass by service roads (bd, be)
|
||||||
|
// d
|
||||||
|
// .
|
||||||
|
// a--->b--->c
|
||||||
|
// .
|
||||||
|
// e
|
||||||
|
bool DrivewayHandler::canProcess(const NodeID /*nid*/,
|
||||||
|
const EdgeID /*via_eid*/,
|
||||||
|
const Intersection &intersection) const
|
||||||
|
{
|
||||||
|
const auto from_eid = intersection.getUTurnRoad().eid;
|
||||||
|
|
||||||
|
if (intersection.size() <= 2 ||
|
||||||
|
node_based_graph.GetEdgeData(from_eid).road_classification.IsLowPriorityRoadClass())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
auto low_priority_count =
|
||||||
|
std::count_if(intersection.begin(), intersection.end(), [this](const auto &road) {
|
||||||
|
return node_based_graph.GetEdgeData(road.eid)
|
||||||
|
.road_classification.IsLowPriorityRoadClass();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Process intersection if it has two edges with normal priority and one is the entry edge,
|
||||||
|
// and also has at least one edge with lower priority
|
||||||
|
return static_cast<std::size_t>(low_priority_count) + 2 == intersection.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
Intersection DrivewayHandler::
|
||||||
|
operator()(const NodeID nid, const EdgeID source_edge_id, Intersection intersection) const
|
||||||
|
{
|
||||||
|
auto road =
|
||||||
|
std::find_if(intersection.begin() + 1, intersection.end(), [this](const auto &road) {
|
||||||
|
return !node_based_graph.GetEdgeData(road.eid)
|
||||||
|
.road_classification.IsLowPriorityRoadClass();
|
||||||
|
});
|
||||||
|
|
||||||
|
(void)nid;
|
||||||
|
OSRM_ASSERT(road != intersection.end(), coordinates[nid]);
|
||||||
|
|
||||||
|
if (road->instruction == TurnInstruction::INVALID())
|
||||||
|
return intersection;
|
||||||
|
|
||||||
|
OSRM_ASSERT(road->instruction.type == TurnType::Turn, coordinates[nid]);
|
||||||
|
|
||||||
|
road->instruction.type =
|
||||||
|
isSameName(source_edge_id, road->eid) ? TurnType::NoTurn : TurnType::NewName;
|
||||||
|
|
||||||
|
return intersection;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace guidance
|
||||||
|
} // namespace extractor
|
||||||
|
} // namespace osrm
|
||||||
@@ -436,6 +436,19 @@ IntersectionHandler::getNextIntersection(const NodeID at, const EdgeID via) cons
|
|||||||
IntersectionViewAndNode{std::move(intersection), intersection_node});
|
IntersectionViewAndNode{std::move(intersection), intersection_node});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IntersectionHandler::isSameName(const EdgeID source_edge_id, const EdgeID target_edge_id) const
|
||||||
|
{
|
||||||
|
const auto &source_edge_data = node_based_graph.GetEdgeData(source_edge_id);
|
||||||
|
const auto &target_edge_data = node_based_graph.GetEdgeData(target_edge_id);
|
||||||
|
|
||||||
|
return source_edge_data.name_id != EMPTY_NAMEID && //
|
||||||
|
target_edge_data.name_id != EMPTY_NAMEID && //
|
||||||
|
!util::guidance::requiresNameAnnounced(source_edge_data.name_id,
|
||||||
|
target_edge_data.name_id,
|
||||||
|
name_table,
|
||||||
|
street_name_suffix_table); //
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace guidance
|
} // namespace guidance
|
||||||
} // namespace extractor
|
} // namespace extractor
|
||||||
} // namespace osrm
|
} // namespace osrm
|
||||||
|
|||||||
@@ -473,17 +473,7 @@ operator()(const NodeID /*nid*/, const EdgeID source_edge_id, Intersection inter
|
|||||||
// In those cases the obvious non-Sliproad is now obvious and we discard the Fork turn type.
|
// In those cases the obvious non-Sliproad is now obvious and we discard the Fork turn type.
|
||||||
if (sliproad_found && main_road.instruction.type == TurnType::Fork)
|
if (sliproad_found && main_road.instruction.type == TurnType::Fork)
|
||||||
{
|
{
|
||||||
const auto &source_edge_data = node_based_graph.GetEdgeData(source_edge_id);
|
if (isSameName(source_edge_id, main_road.eid))
|
||||||
const auto &main_road_data = node_based_graph.GetEdgeData(main_road.eid);
|
|
||||||
|
|
||||||
const auto same_name = source_edge_data.name_id != EMPTY_NAMEID && //
|
|
||||||
main_road_data.name_id != EMPTY_NAMEID && //
|
|
||||||
!util::guidance::requiresNameAnnounced(source_edge_data.name_id,
|
|
||||||
main_road_data.name_id,
|
|
||||||
name_table,
|
|
||||||
street_name_suffix_table); //
|
|
||||||
|
|
||||||
if (same_name)
|
|
||||||
{
|
{
|
||||||
if (angularDeviation(main_road.angle, STRAIGHT_ANGLE) < 5)
|
if (angularDeviation(main_road.angle, STRAIGHT_ANGLE) < 5)
|
||||||
intersection[*obvious].instruction.type = TurnType::Suppressed;
|
intersection[*obvious].instruction.type = TurnType::Suppressed;
|
||||||
@@ -492,7 +482,7 @@ operator()(const NodeID /*nid*/, const EdgeID source_edge_id, Intersection inter
|
|||||||
intersection[*obvious].instruction.direction_modifier =
|
intersection[*obvious].instruction.direction_modifier =
|
||||||
getTurnDirection(intersection[*obvious].angle);
|
getTurnDirection(intersection[*obvious].angle);
|
||||||
}
|
}
|
||||||
else if (main_road_data.name_id != EMPTY_NAMEID)
|
else if (node_based_graph.GetEdgeData(main_road.eid).name_id != EMPTY_NAMEID)
|
||||||
{
|
{
|
||||||
intersection[*obvious].instruction.type = TurnType::NewName;
|
intersection[*obvious].instruction.type = TurnType::NewName;
|
||||||
intersection[*obvious].instruction.direction_modifier =
|
intersection[*obvious].instruction.direction_modifier =
|
||||||
|
|||||||
@@ -68,7 +68,12 @@ TurnAnalysis::TurnAnalysis(const util::NodeBasedDynamicGraph &node_based_graph,
|
|||||||
node_based_graph,
|
node_based_graph,
|
||||||
coordinates,
|
coordinates,
|
||||||
name_table,
|
name_table,
|
||||||
street_name_suffix_table)
|
street_name_suffix_table),
|
||||||
|
driveway_handler(intersection_generator,
|
||||||
|
node_based_graph,
|
||||||
|
coordinates,
|
||||||
|
name_table,
|
||||||
|
street_name_suffix_table)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,8 +137,14 @@ Intersection TurnAnalysis::AssignTurnTypes(const NodeID node_prior_to_intersecti
|
|||||||
// set initial defaults for normal turns and modifier based on angle
|
// set initial defaults for normal turns and modifier based on angle
|
||||||
intersection =
|
intersection =
|
||||||
setTurnTypes(node_prior_to_intersection, entering_via_edge, std::move(intersection));
|
setTurnTypes(node_prior_to_intersection, entering_via_edge, std::move(intersection));
|
||||||
if (motorway_handler.canProcess(
|
if (driveway_handler.canProcess(
|
||||||
node_prior_to_intersection, entering_via_edge, intersection))
|
node_prior_to_intersection, entering_via_edge, intersection))
|
||||||
|
{
|
||||||
|
intersection = driveway_handler(
|
||||||
|
node_prior_to_intersection, entering_via_edge, std::move(intersection));
|
||||||
|
}
|
||||||
|
else if (motorway_handler.canProcess(
|
||||||
|
node_prior_to_intersection, entering_via_edge, intersection))
|
||||||
{
|
{
|
||||||
intersection = motorway_handler(
|
intersection = motorway_handler(
|
||||||
node_prior_to_intersection, entering_via_edge, std::move(intersection));
|
node_prior_to_intersection, entering_via_edge, std::move(intersection));
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ TurnLaneScenario TurnLaneHandler::deduceScenario(const NodeID at,
|
|||||||
(intersection.size() == 2 &&
|
(intersection.size() == 2 &&
|
||||||
((lane_description_id != INVALID_LANE_DESCRIPTIONID &&
|
((lane_description_id != INVALID_LANE_DESCRIPTIONID &&
|
||||||
lane_description_id ==
|
lane_description_id ==
|
||||||
node_based_graph.GetEdgeData(intersection[1].eid).lane_description_id) ||
|
node_based_graph.GetEdgeData(intersection[1].eid).lane_description_id) &&
|
||||||
angularDeviation(intersection[1].angle, STRAIGHT_ANGLE) < FUZZY_ANGLE_DIFFERENCE));
|
angularDeviation(intersection[1].angle, STRAIGHT_ANGLE) < FUZZY_ANGLE_DIFFERENCE));
|
||||||
|
|
||||||
if (is_going_straight_and_turns_continue)
|
if (is_going_straight_and_turns_continue)
|
||||||
|
|||||||
Reference in New Issue
Block a user