| od_coords | R Documentation |
This function takes a wide range of input data types (spatial lines, points or text strings) and returns a matrix of coordinates representing origin (fx, fy) and destination (tx, ty) points.
od_coords(from = NULL, to = NULL, l = NULL)
from |
An object representing origins
(if lines are provided as the first argument, from is assigned to |
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 |
Other od:
od2line(),
od2odf(),
od_aggregate_from(),
od_aggregate_to(),
od_coords2line(),
od_id,
od_id_order(),
od_oneway(),
od_to_odmatrix(),
odmatrix_to_od(),
points2flow(),
points2odf()
od_coords(from = c(0, 52), to = c(1, 53)) # lon/lat coordinates
od_coords(cents_sf[1:3, ], cents_sf[2:4, ]) # sf points
# od_coords("Hereford", "Leeds") # geocode locations
od_coords(flowlines_sf[1:3, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.