items_sign_bdc | R Documentation |
These functions provide support to access assets from Brazil Data Cube.
items_sign_bdc()
:
A simplified function to sign assets' URL from Brazil Data Cube
to be able to access the data.
sign_bdc()
: Creates a signing function to be
used by items_sign()
. This function sign all the assets' URL.
To sign the hrefs with your token you need to store it in an
environment variable in BDC_ACCESS_KEY
or use acess_token
parameter.
items_sign_bdc(items, access_token = NULL, ...)
sign_bdc(access_token = NULL, ...)
items |
a |
access_token |
a |
... |
additional parameters can be supplied to the |
a function
that signs each item assets.
items_sign_bdc()
: items with signed assets URLs.
sign_bdc()
: a function to to be passed to items_sign()
.
## Not run:
# doc_items object
stac_obj <- stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
stac_search(collections = "CB4-16D-2",
datetime = "2019-06-01/2019-08-01") %>%
stac_search() %>%
get_request()
# the new way to authenticate:
stac_obj <- stac_obj %>%
items_sign_bdc("<your-access-token>")
# this is the old way of authentication (still works):
# stac_obj %>%
# items_sign(sign_fn = sign_bdc(access_token = "<your-access-token>"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.