static_functions | R Documentation |
These functions provide support to work with static catalogs.
stac_read()
: open a STAC document from an URL.
read_items()
: opens (statically) all items referred in links
key entry of a given collection document (doc_collection
).
links()
: extracts and filters the links of any STAC document.
link_open()
: opens (statically) the document referenced by
the link. This function can resolve any relative URL.
read_stac(url, ...)
read_items(collection, ..., limit = 100, page = 1, progress = TRUE)
read_collections(catalog, ..., limit = 100, page = 1, progress = TRUE)
links(x, ...)
link_open(link, base_url = NULL)
url |
a |
... |
additional arguments. See details. |
collection |
a |
limit |
an |
page |
an |
progress |
a |
catalog |
a |
x |
any |
link |
a |
base_url |
a |
Ellipsis argument (...
) may appears in different items functions and
has distinct purposes:
stac_read()
: ellipsis is used to pass any additional parameters
to read_json function.
links()
: ellipsis is used to pass logical expressions to be
evaluated against a doc_link
item as a filter criteria. See examples.
links()
: a doc_links
object containing a list of link
entries.
link_open()
: a recognizable rstac
document.
## Not run:
x <- stac("https://brazildatacube.dpi.inpe.br/stac") %>%
collections("CB4-16D-2") %>%
get_request()
link <- links(x, rel == "items")
link_open(link[[1]])
## End(Not run)
## Not run:
wv_url <- paste0(
"https://s3.eu-central-1.wasabisys.com",
"/stac/openlandmap/wv_mcd19a2v061.seasconv/collection.json"
)
wv <- read_stac(wv_url)
stac_type(wv) # Collection
# reads the second page of 5 links
wv_items <- read_items(wv, limit = 5, page = 2)
# lists all links of the collection document that are not items
links(wv, rel != "item")
# lists all links of the items document
links(wv_items)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.