Rdocumentation
powered by
Learn R Programming
osmplotr (version 0.2.0)
shortest_way: shortest_way
Description
returns the shortest path between node_from and node_to (both as names of nodes), or NULL if node_from and node_to are not connected.
Usage
shortest_way(way, node_from, node_to)
Arguments
way
A single highway (as a list of OSM components)
node_from
The ID of a node in way from which to calculate the shortest_path
node_to
The ID of a node in way towards which to calculate the shortest_path
Value
Shortest path as list of nodal IDs (or NULL if no shortest path)