This function extracts values from a raster mosaic based on the regions
defined in a shapefile using exactextractr::exact_extract()
.
Arguments
- mosaic
A
SpatRaster
object representing the raster mosaic from which values will be extracted.- shapefile
A shapefile, which can be a
SpatVector
or ansf
object, defining the regions of interest for extraction.- fun
A character string specifying the summary function to be used for extraction. Default is
"median"
.- ...
Additional arguments to be passed to
exactextractr::exact_extract()
.