Skip to contents

Fix transects found on braided river sections

Usage

fix_braid_transects(
  net,
  transect_lines,
  terminal_id = NULL,
  braid_threshold = NULL,
  version = 2,
  method = "comid",
  precision = 1,
  rm_intersects = TRUE
)

Arguments

net

sf object of NHDplusv2 data

transect_lines

sf linestring dataframe, containing cross sections of flowlines in 'net' the output of "cut_cross_sections2()" function

terminal_id

character, column name containing a unique identifier, delineating seperate networks in the 'network' dataset. Default is NULL which will use 'find_connected_components()' and determine the connected components in the graph to try and create a 'component_id' column in 'network'

braid_threshold

numeric value, value of the total length of all flowlines in a braid. Only braids with total flowline lengths less than or equal to the threshold will be considered by function (i.e. determines that maximum braid size that fix_braid_transects() should operate on). Default is NULL, which will attempt to fix all the braid transects in the data

version

integer, version number of braid algorithm to use, either 1 or 2. Default is 2.

method

The method to determine the geometries to cut. Options are "comid", "component", or "neighbor". Default is "comid"

precision

int, distance in meters to approximate final cross section linestring length. Value you must be greater than 0. Default is 1

rm_intersects

logical, whether to remove transect linestrings that intersect with other parts of the network ('net'). Default is TRUE which will remove intersecting linestrings.

Value

sf object of transect linestrings