Skip to contents

Add a length column to a sf geometry dataframe

Usage

add_length_col(x, length_col = NULL, add_unit_to_col = FALSE)

Arguments

x

sf dataframe

length_col

character, name to use for length column. Default is NULL which will use "geom_length" as the length column name

add_unit_to_col

logical, whether to try and extract units from the geometry and append these to the column name. Default is FALSE

Value

sf dataframe