Convert a data table to individual LINESTRINGs

dataTable2sf_LINESTRING(
  x,
  x1y1x2y2 = c("startLongitude", "startLatitude", "endLongitude", "endLatitude"),
  idCol = NULL,
  crs = NULL
)

Arguments

x

A a data.table or data.frame.

x1y1x2y2

Character: A vector of the names of start x, and end x, start y and end y coordinates.

idCol

Character: A vector of the names of columns to use as ID columns in the returned sf object.

crs

coordinate reference system: integer with the EPSG code, or character with proj4string