streetnet_traveltimes.Rd
Calculate travel times on a street network
streetnet_traveltimes(x, od_pairs, ...)
# S3 method for sfnetwork
streetnet_traveltimes(
x,
od_pairs,
time_column = "time",
weight_column = "weight",
...
)
# S3 method for dodgr_streetnet
streetnet_traveltimes(x, od_pairs, ...)
# S3 method for dodgr_streetnet_sc
streetnet_traveltimes(x, od_pairs, ...)
The street network as an object of class
sfnetwork
,
dodgr_streetnet
or
dodgr_streetnet_sc
.
A data.table
object in which
each row contains the origin and destination location of a route for which
the travel time needs to be calculated. The table should contain the columns
from_lon, from_lat, to_lon and to_lat containing respectively the
longitude and latitude coordinates of respectively the origin and
destination.
Ignored.
Name of the column in the edges table of the street network that contains the travel time values for each edge.
Name of the column in the edges table of the street network that contains the weight of each edge. These value are used to find the shortest path (i.e. the path with minimum weight) between an origin and a destination.
An integer vector of travel times in seconds for each of the given OD pairs.
Coordinates should be expressed in coordinate reference system EPSG:4326. The function assumes this to be true, and does not check for it.