getHUC | R Documentation |
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
)
longitude |
Vector of longitudes in decimal degrees East. |
latitude |
Vector of latitudes in decimal degrees North. |
dataset |
Name of spatial dataset to use. |
HUCs |
Vector of Hydrologic Unit Codes used to limit searches. |
allData |
logical specifying whether a full dataframe should be returned |
useBuffering |
Logical flag specifying the use of location buffering to find the nearest polygon if no target polygon is found. |
Vector of HUC identifiers.
getSpatialData
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.