getHUCName: Return HUC names at specified locations

View source: R/getHUCName.R

getHUCNameR Documentation

Return HUC names at specified locations

Description

Uses spatial comparison to determine which HUC polygons the locations fall into and returns the HUC names 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

getHUCName(
  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 names.

See Also

getSpatialData


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