fwa_query_collection: Query Freshwater Atlas Collection

View source: R/query-collection.R

fwa_collectionR Documentation

Query Freshwater Atlas Collection

Description

Query a collection from the freshwater atlas.

Usage

fwa_collection(
  collection_id,
  filter = NULL,
  limit = 10000,
  bbox = NULL,
  properties = NULL,
  transform = NULL,
  epsg = 4326,
  nocache = getOption("fwa.nocache", FALSE)
)

fwa_query_collection(
  collection_id,
  filter = NULL,
  limit = 10000,
  offset = 0,
  bbox = NULL,
  properties = NULL,
  transform = NULL,
  sortby = NULL,
  groupby = NULL,
  epsg = 4326,
  nocache = getOption("fwa.nocache", FALSE)
)

Arguments

collection_id

A character string of the collection id.

filter

A named vector or list of the filter(s) to apply, where the list names correspond to column names and the list values correspond to the desired value, e.g. list(gnis_name = "Sangan River").

limit

A positive whole number indicating the maximum number of features to return.

bbox

A vector of four numbers indicating bounding box to limit output features to, e.g. c(minLon, minLat, maxLon, maxLat).

properties

A vector of strings of the column names to include. If NULL (default), all columns are retained.

transform

A character vector with the name of the valid transform function followed by the parameter values (e.g. c("ST_Simplify", 100))

epsg

A positive whole number of the epsg to transform features to.

nocache

A flag specifying whether or not to cache results.

offset

A positive whole number indicating the offset of start of returned results.

sortby

A string that sorts the response items by a property. Default is ascending but property name can be prepended with '-' to indicate descending.

groupby

A string of the property name (i.e., column name) to group response features by. This would typically be used with an aggregate transform function.

Value

An sf object.

Functions

  • fwa_collection(): Query Freshwater Atlas Collection

    \lifecycle

    soft-deprecated

See Also

Other collections: fwa_collection_properties(), fwa_collections()

Examples

collection_id <- "whse_basemapping.fwa_approx_borders"
filter <- list(border = "USA_49")
fwa_query_collection(collection_id, filter = filter)

collection_id <- "whse_basemapping.fwa_stream_networks_sp"
filter <- list(gnis_name = "Sangan River")
fwa_query_collection(collection_id, filter = filter)

poissonconsulting/fwapgr documentation built on March 30, 2024, 1:51 a.m.