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

Python wrapper of osrm engine #7

Closed
nilsnolde opened this issue Jul 3, 2023 · 2 comments
Closed

Python wrapper of osrm engine #7

nilsnolde opened this issue Jul 3, 2023 · 2 comments

Comments

@nilsnolde
Copy link
Owner

After #6 is merged and probably before we'll write tests (so we don't have to change them after), we should provide a more abstracted usage pattern for the engine, e.g.

engine = osrm.Engine("./test_data/ch/monaco")  # or osrm.Actor("./test_data/ch/monaco")

route = engine.route([[1,1],[2,2]], **kwargs)  # kwargs could be abstracted RouteParameters, e.g. for the enums

I'm doing that with the Python bindings as well: https://github.com/gis-ops/pyvalhalla/blob/master/valhalla/actor.py. IMO a Python user shouldn't be bothered to know where to import the right enums for. We can abstract everything from here on out in Python and don't need to worry to namespace things in C++ (e.g. RouteAnnotationsType vs TableAnnotationsType). The performance overhead is negligible.

@nilsnolde nilsnolde mentioned this issue Jul 3, 2023
@nilsnolde
Copy link
Owner Author

Do we even still need this @whytro ?

@whytro
Copy link
Collaborator

whytro commented Aug 11, 2023

Apologies for the late reply, but probably not, since the current iteration of bindings were adjusted to work without having another Python wrapper layer.

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

2 participants