Load NHDplus layers into current session
nhd_plus_load(
vpu,
component = "NHDSnapshot",
dsn,
file_ext = NA,
approve_all_dl = FALSE,
force_dl = FALSE,
temporary = FALSE,
pretty = FALSE,
wkt_filter = NA,
...
)
numeric vector processing unit
character component name
data source name
character choice of "shp" for spatial data and "dbf" for non-spatial. optional
logical blanket approval to download all missing data. Defaults to TRUE if session is non-interactive
logical force a re-download of the requested data
logical set FALSE to save data to a persistent rappdirs location
more minimal pretty printing st_read relative to "quiet"
character. WKT spatial filter for selection. See sf::st_read
parameters passed on to sf::st_read
spatial object
This function will ask the user to approve downloading missing data unless approve_all_dl is set to TRUE. Output of this function is saved in active memory (memoized) to speed up repeated function calls.
if (FALSE) {
# Spatial
dt <- nhd_plus_load(4, "NHDSnapshot", "NHDWaterbody")
dt <- nhd_plus_load(c(1,2), "NHDSnapshot", "NHDWaterbody")
dt <- nhd_plus_load(4, "NHDSnapshot", "NHDFlowline")
dt <- nhd_plus_load(4, "NHDPlusCatchment", "Catchment")
# Quieter printing
dt <- nhd_plus_load(4, "NHDSnapshot", "NHDWaterbody", pretty = TRUE)
# Quietest printing
dt <- nhd_plus_load(4, "NHDSnapshot", "NHDWaterbody", quiet = TRUE)
# Non-spatial
dt <- nhd_plus_load(1, "NHDPlusAttributes", "PlusFlow")
dt <- nhd_plus_load("National", "V1_To_V2_Crosswalk",
"NHDPlusV1Network_V2Network_Crosswalk")
gridcode <- nhd_plus_load(1, "NHDPlusCatchment", "featuregridcode")
flowline_vaa <- nhd_plus_load(1, "NHDPlusAttributes", "PlusFlowlineVAA")
eromflow <- nhd_plus_load(4, "EROMExtension", "EROM_010001")
# Character VPU
plusflow <- nhd_plus_load(vpu = "10L", "NHDPlusAttributes", "PlusFlow")
# Spatial filtering via wkt_filter
dt <- nhd_plus_load(4, "NHDSnapshot", "NHDWaterbody", wkt_filter = "POINT (-85.411 42.399)")
}