Skip to content

Commit

Permalink
Add support for the 'straight' maneuver direction (#4995)
Browse files Browse the repository at this point in the history
Add support for the 'straight' maneuver direction
  • Loading branch information
danpat authored Apr 4, 2018
1 parent b5a4ffe commit 649d4ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- 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)
- 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:
- `osrm-routed` accepts a new property `--memory_file` to store memory in a file on disk.
- NodeJS:
Expand Down
2 changes: 2 additions & 0 deletions features/guidance/maneuver-tag.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Feature: Maneuver tag support
| maneuver | abc | c | cgi | turn | sharp_right |
| maneuver | hij | i | cde | turn | sharp_left |
| maneuver | abc | c | cde | turn | slight_left |
| maneuver | cde | c | cgi | turn | straight |

When I route I should get
| waypoints | route | turns |
Expand All @@ -35,6 +36,7 @@ Feature: Maneuver tag support
| b,g | A Street,C Street,C Street | depart,turn sharp right,arrive |
# Testing re-awakening suppressed turns
| 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
Given the node map
Expand Down
4 changes: 4 additions & 0 deletions src/extractor/extraction_containers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,10 @@ void ExtractionContainers::PrepareManeuverOverrides()
{
result.second = guidance::DirectionModifier::Right;
}
else if (direction_string == "straight")
{
result.second = guidance::DirectionModifier::Straight;
}

return result;
};
Expand Down

0 comments on commit 649d4ee

Please sign in to comment.