Compare commits
9 Commits
v5.11.0-rc.1
...
v5.11.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cd1d187d2 | |||
| c1ad275e71 | |||
| 6bae070091 | |||
| 3687b6cb4b | |||
| 196ed9eb46 | |||
| 37c941dff3 | |||
| 40a428d49f | |||
| 48eeef2d30 | |||
| c34520f3a4 |
+1
-3
@@ -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
|
||||
@@ -42,8 +42,6 @@
|
||||
- Algorithm)
|
||||
- BREAKING: the file format requires re-processing due to the changes on via-ways
|
||||
- Added support for via-way restrictions
|
||||
- Node.js Bindings:
|
||||
- Include binaries in the `node_modules/.bin` directory so they're in the PATH when running inside Node
|
||||
|
||||
# 5.9.2
|
||||
- API:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
@routing @guidance
|
||||
Feature: Divided road entry
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 5 meters
|
||||
|
||||
Scenario: Join on a divided road named after the main road
|
||||
Given the node map
|
||||
"""
|
||||
a-------b-----c
|
||||
|
|
||||
d-------e-----f
|
||||
|
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| abc | main st | residential | -1 |
|
||||
| def | main st | residential | yes |
|
||||
| be | main st | residential | |
|
||||
| eg | side st | residential | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| g,a | side st,main st,main st| depart,end of road left,arrive |
|
||||
|
||||
|
||||
# Similar to previous one, but the joining way is tagged with the side-street name
|
||||
Scenario: Join on a divided road, named after the side street
|
||||
Given the node map
|
||||
"""
|
||||
a-------b-----c
|
||||
|
|
||||
d-------e-----f
|
||||
|
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| abc | main st | residential | -1 |
|
||||
| def | main st | residential | yes |
|
||||
| beg | side st | residential | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| g,a | side st,main st,main st| depart,end of road left,arrive |
|
||||
|
||||
|
||||
# Center join named after crossroad
|
||||
Scenario: Crossing a divided road, named after side-street
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
|
|
||||
a-------b-----c
|
||||
|
|
||||
d-------e-----f
|
||||
|
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| abc | main st | residential | -1 |
|
||||
| def | main st | residential | yes |
|
||||
| hbeg | side st | residential | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| g,a | side st,main st,main st| depart,turn left,arrive |
|
||||
|
||||
# Join named after divided road
|
||||
Scenario: Crossing a divided road, named after main street
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
|
|
||||
a-------b-----c
|
||||
|
|
||||
d-------e-----f
|
||||
|
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| abc | main st | residential | -1 |
|
||||
| def | main st | residential | yes |
|
||||
| be | main st | residential | |
|
||||
| hb | side st | residential | |
|
||||
| eg | side st | residential | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| g,a | side st,main st,main st| depart,turn left,arrive |
|
||||
@@ -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 |
|
||||
|
||||
@@ -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
-10
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "osrm",
|
||||
"version": "5.11.0-rc.1",
|
||||
"version": "5.11.0",
|
||||
"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": {
|
||||
@@ -65,14 +65,5 @@
|
||||
"host": "https://mapbox-node-binary.s3.amazonaws.com",
|
||||
"remote_path": "./{name}/v{version}/{configuration}/",
|
||||
"package_name": "{node_abi}-{platform}-{arch}.tar.gz"
|
||||
},
|
||||
"bin": {
|
||||
"osrm-extract": "./lib/binding/osrm-extract",
|
||||
"osrm-contract": "./lib/binding/osrm-contract",
|
||||
"osrm-partition": "./lib/binding/osrm-partition",
|
||||
"osrm-customize": "./lib/binding/osrm-customize",
|
||||
"osrm-routed": "./lib/binding/osrm-routed",
|
||||
"osrm-components": "./lib/binding/osrm-components",
|
||||
"osrm-datastore": "./lib/binding/osrm-datastore"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user