get_od_pairs.Rd
Pair origins with destinations
get_od_pairs(origins, destinations, d_limit = Inf)
A data.frame
or similar representing the
origin locations. Should have only three columns, with the first column
containing unique indices for each location, and the second and third column
containing respectively the longitude and latitude coordinates of each
location.
A data.frame
or similar representing
the possible destination locations. Should have only three columns, with the
first column containing unique indices for each location, and the second and
third column containing respectively the longitude and latitude coordinates
of each location.
Upper distance limit (as-the-crow-flies) in meters to pair
an origin with a destination. Defaults to Inf
, meaning that each origin
will be paired with all possible destinations.
A data.table
object containing one
origin-destination pair per row. The table has six columns named from,
to, from_lon, from_lat, to_lon and to_lat, with the first two
containing the indices of respectively the origin and destination, and the
latter four containing their coordinates.
Coordinates should be expressed in coordinate reference system EPSG:4326. The function assumes this to be true, and does not check for it.