Skip to content
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

Advanced Snapping #24

Open
d3netxer opened this issue Jan 18, 2021 · 2 comments
Open

Advanced Snapping #24

d3netxer opened this issue Jan 18, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@d3netxer
Copy link
Contributor

Currently POIs (origins and destinations) are snapped to the graph using pandana snap. This snaps the POI to the nearest node in the graph. This is not ideal when the nodes in the graph are far away, but a part of the line is close. Salting the graph adds more nodes to the graph and increases the likelihood of snapping to a closer nearby node in the graph.

Ideally, you would like to snap the POI to the nearest point on the line in the graph nearest to the POI. This is possible, and described beautifully in this blog post: https://towardsdatascience.com/connecting-pois-to-a-road-network-358a81447944

I have adapted the code for GOSTnets : )

It runs slower than pandana snap, so pandana snap may still be useful to trade accuracy for speed.

Pull request incoming

@d3netxer
Copy link
Contributor Author

pull request #25

@d3netxer
Copy link
Contributor Author

For future work a further improvement would be fetching reasonable kNN edges from different directions of the Point as mentioned in the blog post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant