Make a request to the /structures endpoint to locate administrative structures via a spatial search or by division, county, water_district, GNIS, or WDID.
Usage
get_structures(
aoi = NULL,
radius = NULL,
county = NULL,
division = NULL,
gnis_id = NULL,
water_district = NULL,
wdid = NULL,
api_key = NULL
)
Arguments
- aoi
list of length 2 containing an XY coordinate pair, 2 column matrix/dataframe of XY coordinates, sf or Terra SpatVector point/polygon/linestring geometry
- radius
numeric, search radius in miles around given point (or the centroid of a polygon). If an AOI is given, radius defaults to 20 miles. If no AOI is given, then default is NULL.
- county
character, indicating the county to query
- division
numeric, indicating the water division to query
- gnis_id
character, water source - Geographic Name Information System ID
- water_district
numeric, indicating the water district to query
- wdid
character vector or list of characters indicating WDID code of structure
- api_key
character, API authorization token, optional. If more than maximum number of requests per day is desired, an API key can be obtained from CDSS. Defaults to NULL.
Examples
if (FALSE) {
# Request endpoint: api/v2/structures/
divrec_structures <- get_structures(
county = "Boulder"
)
# plot administrative structure locations
plot(divrec_structures$latdecdeg~divrec_structures$longdecdeg)
}