This function creates an image collection from a STAC API collection response. It does not need to read any image data. Additionally, bands can be filtered and asset links can be transformed to make them readable for GDAL.
stac_image_collection(
s,
out_file = tempfile(fileext = ".sqlite"),
asset_names = NULL,
asset_regex = NULL,
url_fun = function(x) { paste0("/vsicurl/", x) },
property_filter = NULL,
skip_image_metadata = FALSE
)
STAC feature collection
optional name of the output SQLite database file, defaults to a temporary file
character vector with names of assets (e.g., bands) to be used, other assets will be ignored. By default (NULL), all asset names with "eo:bands" attributes will be used
length 1 character defining a regular expression asset names must match to be considered
optional function to modify URLs of assets, e.g, to add /vsicurl/ to URLS (the default)
optional function to filter STAC items (images) by their properties; see Details
logical, if TRUE per-image metadata (STAC item properties) will not be added to the image collection
The property_filter argument can be used to filter images by metadata such as cloud coverage. The functions receives all properties of a STAC item (image) as input list and is expected to produce a single logical value, where an image will be ignored if the function returns FALSE.