The goal of hfsubsetR
is to extract hydrofabric subsets from cloud or local archives built in lynker-spatial
.
Installation
You can install the development version of hfsubsetR
from GitHub with:
# install.packages("remotes")
remotes::install_github("lynker-spatial/hfsubsetR")
Basic Use
From local file
We can download a version (default = ‘2.2’) hydrofabric (default = ‘nextgen’) for any domain (default = ‘conus’) using get_hydrofabric
.
gpkg <- './conus_nextgen.gpkg'
get_hydrofabric(outfile = gpkg)
From that, we can extract data for a VPU:
get_vpu_fabric(gpkg,
vpuid = "01",
outfile = './01_nextgen.gpkg')
Or, we can extract a subset based on an input identifier (one of id
, comid
, hl_uri
, poi_id
, nldi_feature
, xy
):
subset_fabric <- get_subset(gpkg = gpkg, comid = 101)