A SpatialPolygons Dataframe is broken into smaller pieces based
on HUC code or state. The SpatialPolygons Dataframe must have the required
fields 'stateCode', 'HUC', and 'allStateCodes' and is intended to come from
the convertUSGSHUC()
function. The difference between stateCode and
allStateCodes is that stateCode has just one two-digit ISO code while
allStateCodes can have more than one. This allows the subset to include
HUCs where part of the watershed is in the specified state even though the
centroid is in a different state.
subsetHUC(
SPDF = NULL,
parentHUCs = NULL,
stateCodes = NULL,
allStateCodes = NULL
)
a SpatialPolygons Dataframe subsetted to the appropriate specifications.
a spatial polygons dataframe created using the convertUSGSHUC function
Character vector specifying one or more containing HUCs.
Character vector specifying one or more containing states.
Similar to stateCode, but will also include HUCs who touch the state but whose centroid is in a different state.