Skip to contents

Extend an sf linestring dataframe by a specified lengths vector

Usage

extend_by_length(x, crosswalk_id = NULL, length_vector, length_col = NULL)

Arguments

x

linestring sf dataframe

crosswalk_id

character, unique ID column name

length_vector

numeric, vector of length 'x' representing the number of meters to extend 'x' from both directions (i.e. 10 means the linestring will be extended 10m from both ends of the line)

length_col

character, name of the column in "x" that has the length of the linestring (meters)

Value

sf dataframe with extended linestring geometries