subset_rpu: Subset by Raster Processing Unit.

Description Usage Arguments Value Examples

View source: R/subset_nhdplus.R

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

1
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?

Value

data.frame containing subset network

Examples

1
2
3
4
5
6
7
8
9
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 documentation built on Aug. 18, 2021, 5:07 p.m.