navigate_connected_paths: Navigate Connected Paths

View source: R/navigate_connected_paths.R

navigate_connected_pathsR Documentation

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)

Arguments

x

data.frame network compatible with hydroloom_names.

outlets

vector of ids from data.frame

status

logical print status and progress bars?

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.

Examples

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)


hydroloom documentation built on Sept. 29, 2023, 5:09 p.m.