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

MapboxOSRM isochrone costing parameters #21

Closed
RemaniTinpo opened this issue Jun 10, 2021 · 2 comments
Closed

MapboxOSRM isochrone costing parameters #21

RemaniTinpo opened this issue Jun 10, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@RemaniTinpo
Copy link
Contributor

Hi and thanks for you nice package,

Here's what I did

Query for an isochrone polygon using the class MapboxOSRM as client.

image


Here's what I got

RouterApiError: 422 ({'message': 'Invalid query param', 'code': 'InvalidInput'})

Here's what I was expecting

An object of type routingpy.isochrone.Isochrones


Here's what I think could be improved

  1. I think the issue came from the 'costing' parameters. https://github.com/gis-ops/routing-py/blob/801bb5b3f80bc4852d7a30e0741d5ff5970a52bd/routingpy/routers/mapbox_osrm.py#L401
    When I dry run, then I copy and paste the url, remove the costing parameters and curl the url it works well.

  2. I think there is a typo in the readme, on the multiprovider example. The profile is 'cycling' and it supposes to be mapbox/cycling for the isochrone query.
    https://github.com/gis-ops/routing-py/blob/801bb5b3f80bc4852d7a30e0741d5ff5970a52bd/routingpy/routers/mapbox_osrm.py#L369

@nilsnolde
Copy link
Owner

Thanks for the clear issue report. Seems to be a copy/paste fail from the Valhalla module, definitely a bug. Do you wanna give it a shot in a PR? It's pretty quickly done, you just have to remove the costing stuff and adapt the tests accordingly.

If you don't have the time to PR, can you please provide the code as code not as a pic? Then it's easier for us to reproduce..

BTW, you might as well use the MapboxValhalla connector, it's the exact same. It might look like "OSRM" but it's really Valhalla doing the isochrone calculations at Mapbox.

@nilsnolde nilsnolde added the bug Something isn't working label Jun 10, 2021
@RemaniTinpo
Copy link
Contributor Author

Thanks @nilsnolde for the answer, I pushed a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants