collections_functions {rstac} | R Documentation |
Collections functions
Description
These functions provide support to work with
doc_collections
objects.
-
collections_length()
: shows how many items there are in thedoc_items
object. -
collections_matched()
: shows how many items matched the search criteria. -
collections_fetch()
: request all STAC Items through pagination.
Usage
collections_next(collections, ...)
collections_matched(collections, matched_field)
collections_length(collections)
collections_fetch(collections, ..., progress = TRUE, matched_field = NULL)
Arguments
collections |
a |
... |
additional arguments. See details. |
matched_field |
a |
progress |
a |
Details
Ellipsis argument (...
) appears in different items functions and
has distinct purposes:
-
collections_fetch()
andcollections_next()
: ellipsis is used to pass additionalhttr
options to GET method, such as add_headers or set_cookies.
Value
-
collections_length()
: aninteger
value. -
collections_matched()
: returns aninteger
value if the STAC web server does support this extension. Otherwise returnsNULL
. -
collections_fetch()
: adoc_items
with all matched items. -
collections_next()
: fetches a new page from STAC service.
Examples
## Not run:
# doc_items object
stac("https://cmr.earthdata.nasa.gov/stac/LPCLOUD") |>
collections() |>
get_request() |>
collections_fetch()
## End(Not run)