Skip to contents

Find and uniquely identify braids in a network of flowlines, given an sf dataframe containing crosswalk_id and sf linestring geometries, 'find_braids()" identifies braids as cycles in the graph representation of the river network.

Usage

get_braid_list(network, crosswalk_id = NULL, verbose = FALSE)

Arguments

network

The network object representing the river network.

crosswalk_id

unique ID column name

verbose

Logical indicating whether to display verbose messages during the braid detection process.

Value

list of braid IDs and COMIDs within each braid

Examples

 if (FALSE) {
net <- nhdplusTools::navigate_network(
 start       = 101,
 mode        = "UT",
 distance_km = 100
 ) 

net <- dplyr::select(net, comid, divergence, totdasqkm, fromnode, tonode, terminalpa)

# get a dataframe of COMIDs and braid IDs
braids <- get_braid_list(network = net, crosswalk_id = "comid")
}