rstac: R client library for STAC (rstac)

rstacR Documentation

R client library for STAC (rstac)

Description

logo

Provides functions to access, search and download spacetime earth observation data via SpatioTemporal Asset Catalog (STAC). This package supports the version 1.0.0 (and older) of the STAC specification (https://github.com/radiantearth/stac-spec). For further details see Simoes et al. (2021) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1109/IGARSS47720.2021.9553518")}.

The rstac functions

The rstac package provides two categories of functions: API endpoints and data access and organization.

STAC API endpoints functions

  • stac(): implements STAC ⁠/stac⁠ endpoint for version 0.8.1 or below, and / for versions 0.9.0 or higher.

  • conformance(): implements ⁠/conformance⁠ endpoint.

  • collections(): implements ⁠/collections⁠ and /collections/{collectionId} endpoints.

  • items(): implements /collections/{collectionId}/items and /collections/{collectionId}/items/{featureId} endpoints.

  • queryables(): implements ⁠/queryables⁠ and /collections/{collectionId}/queryables endpoints.

  • stac_search(): implements STAC ⁠/stac/search⁠ endpoint for version 0.8.1 or below, and ⁠/search⁠ endpoint for versions 0.9.0 or higher.

  • ext_filter(): implements ⁠/filter⁠ CQL2 endpoint.

Data access and organization functions

  • get_request(): makes HTTP GET requests to STAC web service.

  • post_request(): makes HTTP POST requests to STAC web service.

  • items_matched(): returns how many items matched the search criteria.

  • items_fetch(): fetches all matched items from service.

  • items_filter(): selects items according to some criteria.

  • items_as_sf(): converts items to a sf object.

  • items_fields(): help explore fields inside items.

  • items_compact(): removes all items with empty assets.

  • items_reap(): extracts contents from items.

  • items_length(): informs how many items are fetched locally.

  • items_sign(): appends tokens to assets' URL and turn them accessible.

  • assets_select(): select assets in items.

  • assets_rename(): rename assets in items.

  • assets_url(): extract all URL to assets in items.

  • assets_download(): download assets in batch.

Data types

The package implements the following S3 classes: doc_items, doc_item, doc_catalog, doc_collections and doc_collection. These classes are regular lists representing the corresponding JSON STAC objects.

Author(s)

Maintainer: Felipe Carvalho lipecaso@gmail.com

Authors:

Other contributors:

  • National Institute for Space Research (INPE) [copyright holder]

See Also

Useful links:


rstac documentation built on Sept. 11, 2024, 7:03 p.m.