collapse_flowlines: Collapse NHDPlus Network

View source: R/collapse.R

collapse_flowlinesR Documentation

Collapse NHDPlus Network

Description

Refactors the NHDPlus flowline network, eliminating short and non-confluence flowlines. The aim of this function is to create flowpaths that describe a network of catchments that combines complex hydrology near confluences into upstream catchments and removes very short flowlines along mainstem flow-paths.

Usage

collapse_flowlines(
  flines,
  thresh,
  add_category = FALSE,
  mainstem_thresh = NULL,
  exclude_cats = NULL,
  warn = TRUE
)

Arguments

flines

data.frame with COMID, toCOMID, LENGTHKM, Hydroseq, and LevelPathI columns

thresh

numeric a length threshold (km). Flowlines shorter than this will be collapsed with up or downstream flowlines.

add_category

boolean if combination category is desired in output, set to TRUE

mainstem_thresh

numeric threshold for combining inter-confluence mainstems

exclude_cats

integer vector of COMIDs to be excluded from collapse modifications.

warn

boolean controls whether warning an status messages are printed

Value

A refactored network with merged up and down flowlines.

See Also

The refactor_nhdplus function implements a complete workflow using 'collapse_flowlines()'.


dblodgett-usgs/hyRefactor documentation built on Oct. 14, 2024, 12:59 p.m.