static_functions {rstac}R Documentation

Static functions

Description

These functions provide support to work with static catalogs.

Usage

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)

Arguments

url

a character value with the URL to a valid STAC document.

...

additional arguments. See details.

collection

a doc_collection object to fetch all rel=="item" links.

limit

an integer with defining the page size of items to fetch.

page

an integer with the page number to fetch the items.

progress

a logical indicating if a progress bar must be shown or not. Defaults to TRUE.

catalog

a doc_catalog object to fetch all rel=="child" links.

x

any rstac document with 'links' key entry.

link

a doc_link object, usually an element of links key entry.

base_url

a character with the base URL to resolve relative links. If NULL (default) rstac will try resolve relative links using internal metadata.

Details

Ellipsis argument (...) may appears in different items functions and has distinct purposes:

Value

Examples

## 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)


[Package rstac version 1.0.0 Index]