od_coordinates_ids: Interleave origin and destination coordinates

View source: R/od-funs.R

od_coordinates_idsR 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))

od documentation built on Sept. 11, 2024, 9:04 p.m.