extract_zonalstats.Rd
Calculate Zonal statistics with gdalcubes
extract_zonalstats(
aoi = NULL,
idcol = NULL,
files = NULL,
times,
bands,
zonalfuns,
bbox,
after,
before,
srs,
dx,
dy,
dt,
aggregation,
resampling,
outpath = NULL,
threads = 1,
...
)
A sf object with polygons / multipolygons
A column name of the aoi
object uniquely identifying the polygons.
The values found in this columns will be appended to the resulting sf object
to allow feature identification.
Input raster files
Input dates
Input band names
A named list with functions for zonal statistics as elements
Bounding Box
Date after
Date before
target spatial reference system as a string; can be a proj4 definition, WKT, or in the form "EPSG:XXXX"
resolution x
resolution y
resoltion time
aggregation method as string, defining how to deal with pixels containing data from multiple images, can be "min", "max", "mean", "median", or "first"
method used in gdalwarp when images are read, can be "near", "bilinear", "bicubic" or others as supported by gdalwarp (see https://gdal.org/programs/gdalwarp.html)
Path for the output GeoPakackage
Number of threads
Additional arguments to st_write
A sf
object in long format with columns for the specified zonal statistics,
and rows for each feature and input time.