You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the same time, operations to construct distances matrix or paths sadly are not very fast, due to that I have some code that is able to connect cppRouting with sfnetworks, the lib implements the Dijkstra algorithm, and is designed with optimization in mind.
I have tested it before, and calculations that I was not able to finish in hours with sfnetworks functions I was able to run them in seconds with this lib.
I think it would give a great benefit to sfnetworks.
I prepared a mini-repo with the examples of how to compute everything of this using sfnetworks.
Is not hard to read, every file describe one function, and how is transform from/to the data between them, the input of all the data are nodes id, the output is always a dataframe with "from"/"to" columns and a "distance"/"path" with the results (path is a geom column).
I hope this code could be implemented, or works as a base to incorporate the lib on sfnetworks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all, I has been able to sfnetworks, it simplifies a lot how to work with networks in R.
All this from: #250
At the same time, operations to construct distances matrix or paths sadly are not very fast, due to that I have some code that is able to connect cppRouting with sfnetworks, the lib implements the Dijkstra algorithm, and is designed with optimization in mind.
https://github.com/vlarmet/cppRouting
I have tested it before, and calculations that I was not able to finish in hours with sfnetworks functions I was able to run them in seconds with this lib.
I think it would give a great benefit to sfnetworks.
I prepared a mini-repo with the examples of how to compute everything of this using sfnetworks.
https://github.com/latot/sample_sfnetworks_cppRouting
Is not hard to read, every file describe one function, and how is transform from/to the data between them, the input of all the data are nodes id, the output is always a dataframe with "from"/"to" columns and a "distance"/"path" with the results (path is a geom column).
I hope this code could be implemented, or works as a base to incorporate the lib on sfnetworks.
Thx!
Beta Was this translation helpful? Give feedback.
All reactions