Add support for the 'straight' maneuver direction (#4995)

Add support for the 'straight' maneuver direction
This commit is contained in:
Daniel Patterson 2018-04-03 17:20:18 -07:00 committed by GitHub
parent b5a4ffed96
commit 649d4ee512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,7 @@
- CHANGED #4929: Don't use obviousness for links bifurcations [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929) - CHANGED #4929: Don't use obviousness for links bifurcations [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929)
- FIXED #4929: Adjust Straight direction modifiers of side roads in driveway handler [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929) - FIXED #4929: Adjust Straight direction modifiers of side roads in driveway handler [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929)
- CHANGED #4925: Added post process logic to collapse segregated turn instructions [#4925](https://github.com/Project-OSRM/osrm-backend/pull/4925) - CHANGED #4925: Added post process logic to collapse segregated turn instructions [#4925](https://github.com/Project-OSRM/osrm-backend/pull/4925)
- ADDED: Maneuver relation now supports `straight` as a direction [#4995](https://github.com/Project-OSRM/osrm-backend/pull/4995)
- Tools: - Tools:
- `osrm-routed` accepts a new property `--memory_file` to store memory in a file on disk. - `osrm-routed` accepts a new property `--memory_file` to store memory in a file on disk.
- NodeJS: - NodeJS:

View File

@ -27,6 +27,7 @@ Feature: Maneuver tag support
| maneuver | abc | c | cgi | turn | sharp_right | | maneuver | abc | c | cgi | turn | sharp_right |
| maneuver | hij | i | cde | turn | sharp_left | | maneuver | hij | i | cde | turn | sharp_left |
| maneuver | abc | c | cde | turn | slight_left | | maneuver | abc | c | cde | turn | slight_left |
| maneuver | cde | c | cgi | turn | straight |
When I route I should get When I route I should get
| waypoints | route | turns | | waypoints | route | turns |
@ -35,6 +36,7 @@ Feature: Maneuver tag support
| b,g | A Street,C Street,C Street | depart,turn sharp right,arrive | | b,g | A Street,C Street,C Street | depart,turn sharp right,arrive |
# Testing re-awakening suppressed turns # Testing re-awakening suppressed turns
| a,e | A Street,B Street,B Street | depart,turn slight left,arrive | | a,e | A Street,B Street,B Street | depart,turn slight left,arrive |
| e,i | B Street,C Street,C Street | depart,turn straight,arrive |
Scenario: single via-way Scenario: single via-way
Given the node map Given the node map

View File

@ -844,6 +844,10 @@ void ExtractionContainers::PrepareManeuverOverrides()
{ {
result.second = guidance::DirectionModifier::Right; result.second = guidance::DirectionModifier::Right;
} }
else if (direction_string == "straight")
{
result.second = guidance::DirectionModifier::Straight;
}
return result; return result;
}; };