Compare commits

..

5 Commits

11 changed files with 94 additions and 19 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
# 5.11.0
- Changes from 5.10:
- Features
- BREAKING: Added support for conditional via-way instructions. This features changes the file format of osrm.restrictions and requires re-extraction
- BREAKING: Added support for conditional via-way restrictions. This features changes the file format of osrm.restrictions and requires re-extraction
- Internals
- BREAKING: Traffic signals will no longer be represented as turns internally. This requires re-processing of data but enables via-way turn restrictions across highway=traffic_signals
- Additional checks for empty segments when loading traffic data files
@@ -18,6 +18,8 @@
- Fix a pre-processing bug where incorrect directions could be issued when two turns would have similar instructions and we tried to give them distinct values (https://github.com/Project-OSRM/osrm-backend/pull/4375)
- The entry bearing for correct the cardinality of a direction value (https://github.com/Project-OSRM/osrm-backend/pull/4353
- Change timezones in West Africa to the WAT zone so they're recognized on the Windows platform
- Use the correct angle modifier at forks
- Issue a `continue` instead of a `turn` when an end-of-road situation (e.g. T-intersection) puts you on the same-named road
# 5.10.0
- Changes from 5.9:
+5 -5
View File
@@ -52,9 +52,9 @@ Feature: Turn Lane Guidance
| dy | | | YSt |
When I route I should get
| waypoints | route | turns | lanes |
| a,e | MySt,MySt,MySt,MySt | depart,continue right,turn right,arrive | ,straight:false right:false right:true,left:false right:true, |
| e,a | MySt,MySt,MySt,MySt | depart,continue left,turn left,arrive | ,left:true left:false straight:false,left:true right:false, |
| waypoints | route | turns | lanes |
| a,e | MySt,MySt,MySt,MySt | depart,continue right,continue right,arrive | ,straight:false right:false right:true,left:false right:true, |
| e,a | MySt,MySt,MySt,MySt | depart,continue left,continue left,arrive | ,left:true left:false straight:false,left:true right:false, |
@anticipate
Scenario: Anticipate Lane Change for quick same direction turns, changing between streets
@@ -780,8 +780,8 @@ Feature: Turn Lane Guidance
| dy | | YSt |
When I route I should get
| waypoints | route | turns | lanes |
| a,e | MySt,MySt,MySt,MySt | depart,continue right,turn right,arrive | ,straight:false straight:false right:false right:true,left:false right:true, |
| waypoints | route | turns | lanes |
| a,e | MySt,MySt,MySt,MySt | depart,continue right,continue right,arrive | ,straight:false straight:false right:false right:true,left:false right:true, |
@anticipate
Scenario: Don't Overdo It
+3 -3
View File
@@ -628,9 +628,9 @@ Feature: Collapse
| cf | secondary | bottom |
When I route I should get
| waypoints | turns | route | locations |
| a,d | depart,continue right,turn right,arrive | road,road,road,road | a,b,c,d |
| d,a | depart,continue left,turn left,arrive | road,road,road,road | d,c,b,a |
| waypoints | turns | route | locations |
| a,d | depart,continue right,continue right,arrive | road,road,road,road | a,b,c,d |
| d,a | depart,continue left,continue left,arrive | road,road,road,road | d,c,b,a |
Scenario: Forking before a turn
Given the node map
+21
View File
@@ -136,3 +136,24 @@ Feature: Continue Instructions
| a,d | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
# continuing right here, since the turn to the left is more expensive
| a,e | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
Scenario: End-Of-Road Continue
Given the node map
"""
a - b - c
|
d - e
|
f
"""
And the ways
| nodes | highway | name |
| abc | primary | road |
| bdf | primary | road |
| ed | primary | turn |
When I route I should get
| waypoints | route | turns |
| e,a | turn,road,road,road | depart,turn right,continue left,arrive |
+4 -2
View File
@@ -97,5 +97,7 @@ Feature: Simple Turns
| ei | left | yes |
When I route I should get
| waypoints | route | turns |
| g,a | in,road,road | depart,fork right,arrive |
| waypoints | route | turns |
| g,a | in,road,road | depart,fork slight right,arrive |
| g,h | in,right,right | depart,fork straight,arrive |
| g,i | in,left,left | depart,fork slight left,arrive |
+3 -3
View File
@@ -835,9 +835,9 @@ Feature: Turn Lane Guidance
| cf | secondary | bottom | |
When I route I should get
| waypoints | turns | route | lanes |
| a,d | depart,continue right,turn right,arrive | road,road,road,road | ,straight:false right:true,, |
| d,a | depart,continue left,turn left,arrive | road,road,road,road | ,left:true straight:false,, |
| waypoints | turns | route | lanes |
| a,d | depart,continue right,continue right,arrive | road,road,road,road | ,straight:false right:true,, |
| d,a | depart,continue left,continue left,arrive | road,road,road,road | ,left:true straight:false,, |
@simple
Scenario: Merge Lanes Onto Freeway
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "osrm",
"version": "5.11.0-rc.2",
"version": "5.11.0-rc.3",
"private": false,
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
"dependencies": {
+25 -1
View File
@@ -158,6 +158,18 @@ void TransferTurnTypeStrategy::operator()(RouteStep &step_at_turn_location,
void AdjustToCombinedTurnAngleStrategy::operator()(RouteStep &step_at_turn_location,
const RouteStep &transfer_from_step) const
{
// Forks point to left/right. By doing a combined angle, we would risk ending up with
// unreasonable fork instrucitons. The direction of a fork only depends on the forking location,
// not further angles coming up
//
// d
// . c
// a - b
//
// could end up as `fork left` for `a-b-c`, instead of fork-right
if (hasTurnType(step_at_turn_location, TurnType::Fork))
return;
// TODO assert transfer_from_step == step_at_turn_location + 1
const auto angle = findTotalTurnAngle(step_at_turn_location, transfer_from_step);
step_at_turn_location.maneuver.instruction.direction_modifier = getTurnDirection(angle);
@@ -173,7 +185,19 @@ void AdjustToCombinedTurnStrategy::operator()(RouteStep &step_at_turn_location,
const RouteStep &transfer_from_step) const
{
const auto angle = findTotalTurnAngle(step_at_turn_location, transfer_from_step);
const auto new_modifier = getTurnDirection(angle);
// Forks point to left/right. By doing a combined angle, we would risk ending up with
// unreasonable fork instrucitons. The direction of a fork only depends on the forking location,
// not further angles coming up
//
// d
// . c
// a - b
//
// could end up as `fork left` for `a-b-c`, instead of fork-right
const auto new_modifier = hasTurnType(step_at_turn_location, TurnType::Fork)
? step_at_turn_location.maneuver.instruction.direction_modifier
: getTurnDirection(angle);
// a turn that is a new name or straight (turn/continue)
const auto is_non_turn = [](const RouteStep &step) {
+15 -1
View File
@@ -629,7 +629,21 @@ std::vector<RouteStep> buildIntersections(std::vector<RouteStep> steps)
BOOST_ASSERT(step_index > 0);
const auto &previous_step = steps[last_valid_instruction];
if (previous_step.intersections.size() < MIN_END_OF_ROAD_INTERSECTIONS)
step.maneuver.instruction.type = TurnType::Turn;
{
bool same_name =
!(step.name.empty() && step.ref.empty()) &&
!util::guidance::requiresNameAnnounced(previous_step.name,
previous_step.ref,
previous_step.pronunciation,
previous_step.exits,
step.name,
step.ref,
step.pronunciation,
step.exits);
step.maneuver.instruction.type =
same_name ? TurnType::Continue : TurnType::Turn;
}
}
// Remember the last non silent instruction
+2 -2
View File
@@ -44,8 +44,8 @@ SegmentLookupTable readSegmentValues(const std::vector<std::string> &paths)
});
if (found_inconsistency != std::end(result.lookup))
{
throw util::exception("empty segment in CSV with node " +
std::to_string(found_inconsistency->first.from) + " " + SOURCE_REF);
util::Log(logWARNING) << "Empty segment in CSV with node " +
std::to_string(found_inconsistency->first.from);
}
return result;
+12
View File
@@ -221,6 +221,12 @@ updateSegmentData(const UpdaterConfig &config,
{
auto u = osm_node_ids[nodes_range[segment_offset]];
auto v = osm_node_ids[nodes_range[segment_offset + 1]];
// Self-loops are artifical segments (e.g. traffic light nodes), do not
// waste time updating them with traffic data
if (u == v)
continue;
if (auto value = segment_speed_lookup({u, v}))
{
auto segment_length = segment_lengths[segment_offset];
@@ -254,6 +260,12 @@ updateSegmentData(const UpdaterConfig &config,
{
auto u = osm_node_ids[nodes_range[segment_offset]];
auto v = osm_node_ids[nodes_range[segment_offset + 1]];
// Self-loops are artifical segments (e.g. traffic light nodes), do not
// waste time updating them with traffic data
if (u == v)
continue;
if (auto value = segment_speed_lookup({v, u}))
{
auto segment_length = segment_lengths[segment_offset];