Skip to contents

Extend an sf linestring dataframe by a percent of the lines length

Usage

extend_by_percent(x, crosswalk_id = NULL, pct = 0.5, length_col = NULL)

Arguments

x

linestring sf dataframe

crosswalk_id

character, unique ID column name

pct

numeric, percent of line to extend linestring by in both directions

length_col

character, name of the output length column name. Default is NULL which will create a length column name of "geom_length".

Value

sf dataframe with extended linestring geometries