View source: R/subset_nhdplus.R
subset_rpu | R Documentation |
Given flowlines and an rpu_code, performs a network-safe subset such that the result can be used in downstream processing. Has been tested to work against the entire NHDPlusV2 domain and satisfies a number of edge cases.
subset_rpu(fline, rpu, run_make_standalone = TRUE, strict = FALSE)
fline |
sf data.frame NHD Flowlines with comid, pathlength, lengthkm, hydroseq, levelpathi, rpuid, and arbolatesu (dnhydroseq is required if tocomid is not provided). |
rpu |
character e.g. "01a" |
run_make_standalone |
logical default TRUE should the run_make_standalone function be run on result? |
strict |
logical if TRUE, paths that extend outside the RPU but have no tributaries in the upstream RPU will be included in the output. |
data.frame containing subset network
source(system.file("extdata/sample_data.R", package = "nhdplusTools"))
sample_flines <- sf::read_sf(sample_data, "NHDFlowline_Network")
subset_rpu(sample_flines, rpu = "07b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.