Takes origins and destinations, finds the optimal routes between them and returns the result as a spatial (sf or sp) object. The definition of optimal depends on the routing function used
route(
from = NULL,
to = NULL,
l = NULL,
route_fun = cyclestreets::journey,
wait = 0,
n_print = 10,
list_output = FALSE,
cl = NULL,
...
)
An object representing origins
(if lines are provided as the first argument, from is assigned to l
)
An object representing destinations
A spatial (linestring) object
A routing function to be used for converting the lines to routes
How long to wait between routes? 0 seconds by default, can be useful when sending requests to rate limited APIs.
A number specifying how frequently progress updates should be shown
If FALSE (default) assumes spatial (linestring) object output. Set to TRUE to save output as a list.
Cluster
Arguments passed to the routing function
Other routes:
route_dodgr()
,
route_osrm()
Other routes:
route_dodgr()
,
route_osrm()