Breaks down the national geo database into a collection of quick to access R binary files.
stage_national_data( include = c("attribute", "flowline", "catchment"), output_path = NULL, nhdplus_data = NULL, simplified = TRUE )
character vector containing one or more of: "attributes", "flowline", "catchment".
character path to save the output to defaults to the directory of the nhdplus_data.
character path to the .gpkg or .gdb
containing the national seamless dataset. Not required if
nhdplus_path has been set.
boolean if TRUE (the default) the CatchmentSP layer will be included.
list containing paths to the .rds files.
"attributes" will save `NHDFlowline_Network` attributes as a separate data.frame without the geometry. The others will save the `NHDFlowline_Network` and `Catchment` or `CatchmentSP` (per the `simplified` parameter) as sf data.frames with superfluous Z information dropped.
The returned list of paths is also added to the nhdplusTools_env as "national_data".
source(system.file("extdata/sample_data.R", package = "nhdplusTools")) stage_national_data(nhdplus_data = sample_data, output_path = tempdir()) #> $attributes #>  "C:\\Users\\DBLODG~2\\AppData\\Local\\Temp\\1\\RtmpSehW27/nhdplus_flowline_attributes.rds" #> #> $flowline #>  "C:\\Users\\DBLODG~2\\AppData\\Local\\Temp\\1\\RtmpSehW27/nhdplus_flowline.rds" #> #> $catchment #>  "C:\\Users\\DBLODG~2\\AppData\\Local\\Temp\\1\\RtmpSehW27/nhdplus_catchment.rds" #>