powered by
Convert origin-destination coordinates into geographic desire lines
odc_to_sf(odc, d = NULL, crs = 4326)
A matrix containing coordinates representing line start and end points
An optional data frame to add to the geometry column
The coordinate reference system of the output, if not known in z. 4326 by default.
z
(odc = od_coordinates(od_data_df, p = od_data_zones, sfnames = TRUE)) (l = odc_to_sf(odc)) plot(l) lsfc = odc_to_sfc(odc)
Run the code above in your browser using DataLab