Create SpatRaster and SpatRasterCollection from Google Earth Engine Image and ImageCollection

EEImage(x, silent = TRUE, ...)

EEImageCollection(
  x,
  ...,
  n = 10,
  WHERE = NULL,
  query = paste("SELECT * FROM", get_asset_ogr_table_name(x), WHERE, "LIMIT ", n),
  silent = TRUE
)

Arguments

x

Path to Google Earth Engine Image/ImageCollection asset

silent

logical. Silence warning/error messages? Default: TRUE

...

Additional arguments to terra::rast()

n

integer. Maximum of elements of ImageCollection to return added to the default query. Defaults to 10; large collections may take a while to query.

WHERE

character. Optional WHERE clause added to the default query.

query

character. Query argument used by terra::vect(). Defaults to paste("SELECT * FROM", get_asset_ogr_table_name(x), WHERE, "LIMIT ", n)

Value

EEImage(): a SpatRaster

EEImageCollection(): a SpatRasterCollection where each element is a (sub)dataset from the source ImageCollection x

Examples

if (FALSE) {
EEImage("projects/earthengine-public/assets/COPERNICUS/S2/20170430T190351_20170430T190351_T10SEG")
}
if (FALSE) {
EEImageCollection("projects/earthengine-public/assets/COPERNICUS/S2", n = 5)
}