Skip to content

Add support for opposite approach request parameter #6842

Merged
mjjbell merged 3 commits intoProject-OSRM:masterfrom
mjjbell:mbell/opposite_approach
Apr 3, 2024
Merged

Add support for opposite approach request parameter #6842
mjjbell merged 3 commits intoProject-OSRM:masterfrom
mjjbell:mbell/opposite_approach

Conversation

@mjjbell
Copy link
Copy Markdown
Member

@mjjbell mjjbell commented Apr 2, 2024

Issue

As outlined in #5616, adding support for restricting the waypoint approach to the opposite direction, relative to the input coordinate.

It was included in the original approaches PR (#4039), but dropped due to lack of support at the time.
This is beneficial for VRP use-cases in particular, and is a simple enough addition that I think it's worth supporting.

This PR leverages @asaveljevs changes, I've just added some additional docs and test coverage.

Tasklist

Requirements / Relations

Fixes #5616

@mjjbell mjjbell force-pushed the mbell/opposite_approach branch from 4cab282 to 1d285ad Compare April 2, 2024 22:39
{
CURB = 0,
UNRESTRICTED = 1
OPPOSITE = 1,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an enum class and it is not likely there are casts from/to integers. Yet, it might make sense to keep value assignments, i.e. to add OPPOSITE = 2.

@DennisOSRM
Copy link
Copy Markdown
Collaborator

Looks good, only one minor nitpick.

@mjjbell mjjbell merged commit 8ef366e into Project-OSRM:master Apr 3, 2024
eliseier pushed a commit to wanderlog/osrm-backend that referenced this pull request Mar 25, 2025
* Added approach on the opposite side of the road.

* Additional test and docs coverage for opposite approach

---------

Co-authored-by: Aleksandrs Saveljevs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add approach on the opposite side of the road

3 participants