query_usgs_arcrest: Query USGS Hydro ESRI Rest Server

View source: R/arcrest_tools.R

query_usgs_arcrestR Documentation

Query USGS Hydro ESRI Rest Server

Description

Query the USGS Hydro ESRI Rest Server for spatial data by location, area, or ID.

Usage

query_usgs_arcrest(
  AOI = NULL,
  ids = NULL,
  type = NULL,
  service = NULL,
  where = NULL,
  t_srs = NULL,
  buffer = 0.5,
  page_size = 2000
)

Arguments

AOI

sf (MULTI)POINT or (MULTI)POLYGON. An 'area of interest' can be provided as either a location (sf POINT) or area (sf POLYGON) in any Spatial Reference System.

ids

character. A set of identifier(s) from the data type requested, for 3dhp, this is id3dhp.

type

character. Type of feature to return If NULL (default) a data.frame of available types is returned

service

character chosen from "3DHP_all", "NHDPlus_HR"

where

character An where clause to pass to the server.

t_srs

character (PROJ string or EPSG code) or numeric (EPSG code). A user specified - target -Spatial Reference System (SRS/CRS) for returned objects. Will default to the CRS of the input AOI if provided, and to 4326 for ID requests.

buffer

numeric. The amount (in meters) to buffer a POINT AOI by for an extended search. Default = 0.5

page_size

numeric default number of features to request at a time. Reducing may help if 500 errors are experienced.

Details

The returned object(s) will have the same Spatial Reference System (SRS) as the input AOI. If a individual or set of IDs are used to query, then the default CRS of EPSG:4269 is preserved. In all cases, a user-defined SRS can be passed to t_srs which will override all previous SRS (either input or default). All buffer and distance operations are handled internally using in EPSG:5070 Albers Equal Area projection

Value

a simple features (sf) object or valid types if no type supplied


nhdplusTools documentation built on April 3, 2025, 6:03 p.m.