Computes the minimum-weight path from from to to using Dijkstra's
algorithm in the Rust core.
Arguments
- g
An osm_graph.
- from, to
Node
osmids (as returned byox_nearest_nodes()).- weight
Edge column used as weight. Default
"length".
Examples
g <- example_osm_graph()
from <- ox_nearest_nodes(g, 0, 0)
to <- ox_nearest_nodes(g, 300, 300)
ox_shortest_path(g, from, to)
#> [1] 1 5 9 13 14 15 16