Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Solution::set_geometry to get routes #95

Open
nilsnolde opened this issue Aug 20, 2023 · 3 comments
Open

Expose Solution::set_geometry to get routes #95

nilsnolde opened this issue Aug 20, 2023 · 3 comments
Assignees

Comments

@nilsnolde
Copy link
Collaborator

Currently it seems like we don't expose API to get the final routes when a routing engine was used instead of custom matrices, see #94 . Should be easy, I'll give it a go soon.

@nilsnolde nilsnolde self-assigned this Aug 20, 2023
@jonathf
Copy link
Collaborator

jonathf commented Aug 21, 2023

PR created in vroom exposing the geometry attribute. After it is merged, we can expose it in pyvroom.

@nilsnolde
Copy link
Collaborator Author

I was wrong, see VROOM-Project/vroom#972 (comment)

@jcoupey
Copy link
Contributor

jcoupey commented Aug 21, 2023

Maybe worth providing a bit of context here on what happens upstream. The Input::set_geometry is just the tip of the iceberg here, since it only serves as a way to set the Input::_geometry (private) flag, which simply is a translation of whether the -g option is passed to the vroom command-line.

Then based on that flag, we'll potentially call the add_route_info function from the routing wrappers on every route to get the actual detailed route geometry.

So if you want to get the encoded polyline describing the actual geometry, you want to first make sure Input::_geometry is true, then reach for the Route::geometry values in the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants