Trail Finder
Category: Recursion
Problem
The local State Park has lots of trails and the connect together like a giant mesh network. Having a goal to walk all the trails in one day, one might wounder if it is even possible. And if it is possible what would be the shortest route with out doing a lot backtracking?
Action
By collecting trail data using an app like “Gaia GPS” and exporting the.geojson files, we can use the data to calculate this. The challenge is creating logic that can walk down the trails and come to an accurate conclusion on the shortest route.
Result
An app that lets you import a json file for each trail and connect the trails up using intersections. Using Javascript and a recursion algorithm the program can find every single possible solution and than filter them by the shortest. The shortest routes are displayed for the user and can be exported to csv.
Check it out! Trail Finder GitHub: https://github.com/kalevnakah/trail-finder
