get_partial_length {hydroloom} | R Documentation |
Get Partial Flowpath Length
Description
Finds the upstream and downstream lengths along a given flowpath (flowline in NHDPlus terminology). Internally, the function rescales the aggregate_id_measure to a id_measure and applies that rescaled measure to the length of the flowpath.
Usage
get_partial_length(hydro_location, network = NULL, flowpath = NULL)
Arguments
hydro_location |
list containing a hydrologic locations with names aggregate_id (reachcode) and aggregate_id_measure (reachcode measure). |
network |
data.frame network compatible with hydroloom_names. |
flowpath |
data.frame containing one flowpath that corresponds to the
|
Value
list containing up
and dn
elements with numeric length in
km.
Examples
x <- sf::read_sf(system.file("extdata", "walker.gpkg", package = "hydroloom"))
hydro_location <- list(comid = 5329339,
reachcode = "18050005000078",
reach_meas = 30)
(pl <- get_partial_length(hydro_location, x))
[Package hydroloom version 1.0.2 Index]