-
Notifications
You must be signed in to change notification settings - Fork 962
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
@turf/shortest-path is not giving the shortest path & minDistance option is not working #1211
Comments
Gday @bulutkartal Yeah unfortunantly the shortest-path module is still very days. @stebogit might be able to provide more comment as to what he's struggling with... |
It is a great start :) Just needs some improvements. |
Hi @bulutkartal, I agree with you this module should perform better. I believe the minDistance feature could/should be implemented just applying a buffer to each obstacle and run the shortest path with them. Unfortunately right now I don't have enough time to dedicate to this project. 😞 |
I started looking at a visibility graph to power our astar algorithm, this will do away with the need for the gridded approach, still a little while away though, I'll try and post a link to a public repo tomorrow |
Here is my WIP repo for constructing a visibility graph from geojson. It's surprising but I can't find any js implementations for constructing visibility graphs. My work is based porting this python lib. I'm still getting my head around the algorithm so it's not working yet but hopefully it's not too far off |
Pyvisgraph is a great example. I wish he would do it in c# :( |
I found this research about Deriving an Obstacle-Avoiding Shortest Path in Continuous Space Vector-based approach looks a lot better than raster-based approach :) |
Hi @bulutkartal Thanks for that link, looks like a very helpful paper in understanding shortest path considerations. I've made reasonable progress on porting pyvisgraph to js - see this demo, there are just some structure things in the API that I want to tidy up to make it more useful. For example once you have a graph of countries you should be able to reuse that (rather than having to recalcuate it everytime), but you also need the flexibility to add new points (your start and end points) and calculate their visibility. So my intent is to convert the graph into the ngraph.graph lib which has support for saving graphs, and then use the associated path library for calcuating the shortest path. So still got some work to do but making progress |
Hi @rowanwins , |
Hi, hope this sample will reduce your work on this. |
An implementation of the shortest path using the visgraph approach described above would be much appreciated. |
Algorithm creates extra waypoints and makes the route/path longer than it supposed to be. Also minimum distance option is not working.
Example Fiddle based on documentation test.
Until the first wp under the polygon it created 6 unnecessary waypoints. Also did the same thing when clear from polygon as well.
Also if you zoom in, you will see the path is going over polygon as well.
The text was updated successfully, but these errors were encountered: