getHUC: Return HUCs at specified locations

View source: R/getHUC.R

getHUCR Documentation

Return HUCs at specified locations

Description

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.

Usage

getHUC(
  longitude = NULL,
  latitude = NULL,
  dataset = NULL,
  HUCs = NULL,
  allData = FALSE,
  useBuffering = FALSE
)

Arguments

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.

Value

Vector of HUC identifiers.

See Also

getSpatialData


MazamaSpatialUtils documentation built on Sept. 8, 2023, 5:22 p.m.