od_coordinates_ids {od} | R Documentation |
Interleave origin and destination coordinates
Description
This function takes a matrix with 4 columns representing origin and destination coordinates and returns a data frame with 3 columns with the ID of each linestring, plus the coordinates representing origin and destination coordinates. Essentially the function is a pivot, converting from wide to long format, to feed into other functions for creating geographic desire lines.
Usage
od_coordinates_ids(odc)
Arguments
odc |
A matrix containing coordinates representing line start and end points |
Examples
od_coordinates_ids(od_coordinates(od_data_df, p = od_data_zones, sfnames = TRUE))
[Package od version 0.4.4 Index]