Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

subset_rpu

Subset by Raster Processing Unit.


Description

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.

Usage

subset_rpu(fline, rpu, run_make_standalone = TRUE)

Arguments

fline

sf data.frame NHD Flowlines with COMID, Pathlength, LENGTHKM, and Hydroseq. LevelPathI, RPUID, ToNode, FromNode, and ArbolateSu.

rpu

character e.g. "01a"

run_make_standalone

boolean should the run_make_standalone function be run on result?

Examples

source(system.file("extdata/sample_data.R", package = "nhdplusTools"))

nhdplus_path(sample_data)

staged_nhdplus <- stage_national_data(output_path = tempdir())

sample_flines <- readRDS(staged_nhdplus$flowline)

subset_rpu(sample_flines, rpu = "07b")

nhdplusTools

NHDPlus Tools

v0.4.0
CC0
Authors
David Blodgett [aut, cre], Mike Johnson [ctb] (<https://orcid.org/0000-0002-5288-8350>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.