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
costmatrix algorithm do not respect oneway on trivial routes #4538
Comments
I think this is a duplicate of #4433. I'm fairly sure bidir routing a* would have the same or a similar problem. For routing we use unidir a* for trivial routes (one edge), also because it's faster, but pretty sure also because there's problems with bidir algos if they start/end on the same edge. Of course we can't really do the same stratagy for matrix, we'd need to actually solve it. The route might be trivial, not sure the solution will be. |
Actually I'll keep this open and close the other one, this has a test case |
We tested this, and indeed PR 4626 fixes this for values. Thank you for fixing this. Travel time and distance are now computed properly, respecting one-way restrictions in matrix computation. However, the polyline in the matrix return is not accurate. Looks like polyline generation in matrix cant handle this special oneway trivial route? It seems like the first segment is in the polyline in both directions, making it appear like a polygon rather than line with start and end, as in route computation. |
Yeah seems it’s getting confused about the percent_along.. I’ll take a look later. |
If we use this request to route endpoint:
oneway is respected properly.
Foggis
https://valhalla.openstreetmap.de/directions?profile=car&wps=15.83895%2C50.22878%2C15.83918%2C50.22888
Polyline
https://valhalla.github.io/demos/polyline/?unescape=true&polyline6=true#qyux~Aguve%5DpUhx%40x%60%40%60uAjTiStQmQvQoQim%40smBu%40iC%7DSgu%40ox%40ju%40lDzL
Screenshot:
If we try find same route for matrix, using costmatrix algorithm:
response is:
Polyline:
https://valhalla.github.io/demos/polyline/?unescape=true&polyline6=true#cyux~Aquve%5DwDyM
Screenshot:
The text was updated successfully, but these errors were encountered: