Last chance! 50% off unlimited learning
Sale ends in
Extract coordinates from OD data
od2odf(flow, zones)
A spatial object representing origins (and destinations if no separate destinations object is provided) of travel.
Origin-destination (OD) data is often provided
in the form of 1 line per OD pair, with zone codes of the trip origin in the first
column and the zone codes of the destination in the second column
(see the vignette("stplanr-od")) for details.
od2odf()
creates an 'origin-destination data frame', based on a data frame containing
origin and destination cones (flow
) that match the first column in a
a spatial (polygon or point) object (zones
).
The function returns a data frame with coordinates for the origin and destination.
Other od: dist_google
, od2line
,
od_aggregate_from
,
od_aggregate_to
,
od_aggregate
, od_coords2line
,
od_coords
, od_dist
,
od_id
, od_oneway
,
od_radiation
, od_to_odmatrix
,
odmatrix_to_od
, points2flow
,
points2odf
, sp_aggregate
# NOT RUN {
data(flow)
data(zones)
od2odf(flow[1:2, ], zones)
# }
Run the code above in your browser using DataLab