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:
Name | Digits | Average Size (sqmiles) | Example Name | Example Code |
Region | 2 | 177,560 | Pacific Northwest | 17 |
Subregion | 4 | 16,800 | Lower Snake | 1706 |
Basin | 6 | 10,596 | Lower Snake | 170601 |
Subbasin | 8 | 700 | Imnaha River | 17060102 |
Watershed | 10 | 227 | Upper Imnaha River | 1706010201 |
Subwatershed | 12 | 40 | North Fork Imnaha River | 170601020101 |
Name | Digits | Average Size (sqmiles) | Example Name |
findWBD(AOI = NULL, level = 8, subbasins = FALSE, crop = TRUE, ids = FALSE)
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 = |
ids | If TRUE, a vector of finest resolution HUC codes is added to retuned list (default = |
# 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) # }