st_sf_linestring_from_points: From a df where each row represents an edge in 2D of the form...

View source: R/linestring_endpoints.R

st_sf_linestring_from_pointsR Documentation

From a df where each row represents an edge in 2D of the form (lng_1,lat_1), (lng_2,lat_2), create an sf object with LINESTRING geometry

Description

From a df where each row represents an edge in 2D of the form (lng_1,lat_1), (lng_2,lat_2), create an sf object with LINESTRING geometry

Usage

st_sf_linestring_from_points(
  df_segments,
  col_start_x = "start_x",
  col_start_y = "start_y",
  col_end_x = "end_x",
  col_end_y = "end_y",
  crs = 4326
)

Arguments

col_start_x

start represents the first endpoint (start is a misnomer there is no edge orientation)

col_end_y

Value

shp_segments_endpoints sf object


cgauvi/sfSpHelpers documentation built on June 30, 2023, 10:48 p.m.