Uses spatial comparison to determine which HUC polygons the locations fall into and returns the HUC identifier strings for those polygons.
Specification of HUCs
limits spatial searching to the
specified HUCs and greatly improves performance. For instance, if searching
for level 10 HUCs in the Upper Columbia basin, it would make sense to first
search WBDHU4_01 to learn that the level 4 HUC is 1702
. Then you
can greatly improve search times for higher level HUCs by specifying:
HUCs = c("1702")
.
If allData = TRUE
, additional data is returned.
getHUC(
longitude = NULL,
latitude = NULL,
dataset = NULL,
HUCs = NULL,
allData = FALSE,
useBuffering = FALSE
)
Vector of HUC identifiers.
Vector of longitudes in decimal degrees East.
Vector of latitudes in decimal degrees North.
Name of spatial dataset to use.
Vector of Hydrologic Unit Codes used to limit searches.
logical specifying whether a full dataframe should be returned
Logical flag specifying the use of location buffering to find the nearest polygon if no target polygon is found.
getSpatialData