add_lengthmap: Add Length Map to Refactored Network

add_lengthmapR Documentation

Add Length Map to Refactored Network

Description

This function replicates the member_COMID column of a refactored network but adds a new notation Following each COMID is '.' which is proceeded by the fraction of that COMID making up the new flowpath. For example 101.1 would indicate 100 Equally 101.05 would indicate 50

Usage

add_lengthmap(flowpaths, length_table)

Arguments

flowpaths

a refactored flowpath network containing an member_COMID column

length_table

a table of NHDPlus COMIDs and LENGTH to use as weights. Can be found with nhdplusTools::get_vaa("lengthkm")

Value

sf object

Examples

## Not run: 
path <- system.file("extdata/walker_reconcile.gpkg", package = "hyRefactor")
fps  <- add_lengthmap(flowpaths = sf::read_sf(path),
length_table = nhdplusTools::get_vaa("lengthkm"))

## End(Not run)

dblodgett-usgs/hyRefactor documentation built on Oct. 14, 2024, 12:59 p.m.