split_my_linestrings: Split the geometry using the splits_number column

Description Usage Arguments Value

View source: R/break_linestrings.R

Description

This function loads an sf object with the active geometry "linestring" and breaks each of these large lines to many lines.

Usage

1
2
3
4
5
6
split_my_linestrings(
  x,
  length_col = "length_m",
  splits_number = "splits_in_meters",
  uid = "pipe_id"
)

Arguments

x

An sf object or sf dataframe with a length column (length_col), splits_number, and a unique idenifier.

length_col

The field with the continuous "length" variable which denotes the length of the geometry.

splits_number

The field with the length(in meters) to split the geometry with.

uid

This column represents the unique identifier to identify the geometries which have or have not been split.

Value

Returns a dataframe with the addition of "new_length" column


tayoso2/sfXtra documentation built on Dec. 23, 2021, 7:50 a.m.