Learn R Programming

hydroloom (version 1.1.0)

navigate_connected_paths: Navigate Connected Paths

Description

Given a network and set of ids, finds paths or lengths between all identified flowpath outlets. This algorithm finds paths between outlets regardless of flow direction.

Usage

navigate_connected_paths(x, outlets, status = FALSE)

Value

data.frame containing the distance between pairs of network outlets and a list column containing flowpath identifiers along path that connect outlets. For a network with one terminal outlet, the data.frame will have nrow(x)^2 rows.

Arguments

x

data.frame network compatible with hydroloom_names.

outlets

vector of ids from data.frame

status

logical print status and progress bars?

Examples

Run this code
x <- sf::read_sf(system.file("extdata", "walker.gpkg", package = "hydroloom"))

outlets <- c(5329303, 5329357, 5329317, 5329365, 5329435, 5329817)

x <- add_toids(hy(x))

navigate_connected_paths(x, outlets)

Run the code above in your browser using DataLab