R: Create an image collection from a STAC feature collection

stac_image_collection {gdalcubes} | R Documentation

## Create an image collection from a STAC feature collection

### Description

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.

### Usage

    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
    )

### Arguments

`s` | STAC feature collection
`out_file` | optional name of the output SQLite database file, defaults to a temporary file
`asset_names` | 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
`asset_regex` | length 1 character defining a regular expression asset names must match to be considered
`url_fun` | optional function to modify URLs of assets, e.g, to add /vsicurl/ to URLS (the default)
`property_filter` | optional function to filter STAC items (images) by their properties; see Details
`skip_image_metadata` | logical, if TRUE per-image metadata (STAC item properties) will not be added to the image collection

### Details

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.

### Note

Currently, bbox results are expected to be WGS84 coordinates, even if bbox-crs is given in the STAC response.

This function is experimental.

[Package gdalcubes version 0.6.0 Index]