Description
I'm working on a project where I'm creating routes based on the city's geoJSON bike lane data. So far it works pretty well, except sometimes small loops are created. I'd assumed this was because of the distance between each of the points in the data set. I've been experimenting with ways that I can improve results by modifying the data set, but have begun to question my understanding of the pathfinding algorithm because that has produced even stranger results.
I'm working on the assumption that the denser the coordinates the better. Is this a misconception? I iterated through my dataset and added a midpoint between each coordinate using the Turf midpoint helper function, but the results actually seem worse. I also seem to get a different path each time for the same destination. I think the primary issue is that the bike lane system is pretty sparse, so I'm trying to strategize ways to modify the dataset to optimize results.
Thanks!