point_to_line {gps.track} | R Documentation |
Data.frame with coordinates of points to sf with coordinates of line
Description
Allows converting data.frame with coordinates of points into sf with coordinates of line.
Usage
point_to_line(
data = NULL,
col_long = "long",
col_lat = "lat",
crs_proj = "+proj=longlat +datum=WGS84"
)
Arguments
data |
Data frame containing coordinates of points to convert to lines |
col_long |
String containing the name of the column containing the longitude |
col_lat |
String containing the name of the column containing the latitude |
crs_proj |
String containing the proj4string |
Value
returns a sf object with coordinates of line.
Examples
path.file.ex <- base::system.file("extdata", "df_gps.csv", package = "gps.track")
df.gps <- read.table(path.file.ex,h=TRUE)
df.gps.line <-
point_to_line(
data = df.gps,
col_long = "long",
col_lat = "lat",
crs_proj = "+proj=longlat +datum=WGS84"
)
[Package gps.track version 1.0.0 Index]