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
Usage
route(from = NULL, to = NULL, l = NULL,
route_fun = stplanr::route_cyclestreet, n_print = 10,
list_output = FALSE, ...)
Arguments
from
An object representing origins
(if lines are provided as the first argument, from is assigned to l)
to
An object representing destinations
l
Only needed if from and to are empty, in which case this
should be a spatial object representing desire lines
route_fun
A routing function to be used for converting the straight lines to routes
od2line()
n_print
A number specifying how frequently progress updates
should be shown
list_output
If FALSE (default) assumes SpatialLinesDataFrame output. Set to TRUE to save output as a list.