Learn R Programming

MazamaSpatialUtils (version 0.7.6)

getHUC: 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.

If allData = TRUE, additional data is returned.

Usage

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

Value

Vector of HUC identifiers.

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.

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 not target polygon is found.

See Also

getSpatialData