perliedman / geojson-path-finder

Find shortest path through a network of GeoJSON
https://www.liedman.net/geojson-path-finder/
ISC License
300 stars 86 forks source link

Round trip feature? #83

Closed louisondumont closed 1 year ago

louisondumont commented 1 year ago

Not so much an issue but hoping you guys can help: is there any way to adjust this to generate round trip paths of a specified distance? Instead of finding the shortest path, I want to tell it: give me a path of approximately 3km with start = finish.

Thanks!

perliedman commented 1 year ago

Hi!

I'm not familiar with algorithms that produce this type of round-trips, and it's not a feature the library has now.

Depending on how they work, it might be that the underlying graph/topology created by geojson-path-finder could be useful for solving this class of problem, but you would have to implement the round trip algorithm on top of them.

I'm closing this as it's not something I think is in scope for the module, but feel free to keep us updated if you find something, especially if it turns out to be small adjustments to what's already in place!