collapse_flowlines | R Documentation |
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.
collapse_flowlines(
flines,
thresh,
add_category = FALSE,
mainstem_thresh = NULL,
exclude_cats = NULL,
warn = TRUE
)
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 |
A refactored network with merged up and down flowlines.
The refactor_nhdplus
function implements a complete
workflow using 'collapse_flowlines()'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.