The United States Geological Survey maintains a hierarchical system of hydrologic units each assigned a unique code (HUC). The heirarchical level is described by the number of digits in the code. A two-diget code (eg. HUC 2) is the coarsest unit of aggregation while the HUC 12 is the finest resulution. The spatail geometries of these units are stored in the Watershed Boundary Dataset with coverage of the United States. findWBD returns a SpatialPolygonsDataFrame* of WBD boundaries for the specified level within an AOI. Pending the query, data comes from the USGS CIDA server or the USGS staged products FTP.

Below you can see the general factors for each HUC level:

NameDigitsAverage Size (sqmiles)Example NameExample Code
Region2177,560Pacific Northwest17
Subregion416,800Lower Snake1706
Basin610,596Lower Snake170601
Subbasin8700Imnaha River17060102
Watershed10227Upper Imnaha River1706010201
Subwatershed1240North Fork Imnaha River170601020101
NameDigitsAverage Size (sqmiles)Example Name
findWBD(AOI = NULL, level = 8, subbasins = FALSE, crop = TRUE,
  ids = FALSE)

Arguments

AOI

A Spatial* or simple features geometry, can be piped from getAOI

level

defines the HUC level of interest (default = 8)

subbasins

If TRUE, all subbasins of the supplied level will be joined to retuned list

crop

If TRUE, all objects are cropped to the AOI boundaries (default = TRUE)

ids

If TRUE, a vector of finest resolution HUC codes is added to retuned list (default = FALSE)

Examples

# NOT RUN {
# Get Cropped HUC8s for AOI
 getAOI(clip = list("UCSB", 10, 10)) %>% findWBD()

# Get Cropped HUC10s for AOI
 getAOI(clip = list("UCSB", 10, 10)) %>% findWBD(level = 10)

# Get Cropped HUC8s, HUC10s and HUC12s for AOI
 getAOI(clip = list("UCSB", 10, 10)) %>% findWBD(level = 8, subbasins = TRUE)

# Get uncropped HUC10s for AOI
 getAOI(clip = list("UCSB", 10, 10)) %>% findWBD(level = 10, crop = FALSE)
# }