Learn R Programming

rstac (version 0.9.1-5)

sign_bdc: Signature in hrefs provided by the STAC from the Brazil Data Cube project.

Description

To sign the hrefs with your token you need to store it in an environment variable in BDC_ACCESS_KEYor use acess_token parameter.

Usage

sign_bdc(access_token = NULL, ...)

Value

a function that signs each item assets.

Arguments

access_token

a character with the access token parameter to access Brazil Data Cube assets.

...

additional parameters can be supplied to the GET function of the httr package.

Examples

Run this code
if (FALSE) {
# STACItemCollection object
stac_obj <- stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
  stac_search(collections = "CB4_64_16D_STK-1",
              datetime = "2019-06-01/2019-08-01") %>%
  stac_search() %>%
  get_request()

# signing each item href
stac_obj %>% items_sign(sign_fn = sign_bdc(access_token = "123"))

}

Run the code above in your browser using DataLab