Takes a series of geographical points and converts them into a spatial (linestring) object representing the potential flows, or 'spatial interaction', between every combination of points.

points2flow(p)

Arguments

p

A spatial (point) object

See also

Examples

data(cents) plot(cents)
flow <- points2flow(cents)
#> Warning: CRS object has comment, which is lost in output
#> Warning: Discarded datum Unknown based on WGS84 ellipsoid in Proj4 definition
plot(flow, add = TRUE)
flow_sf <- points2flow(cents_sf) plot(flow_sf)