This function is used to extract pixel values of a predictor set of type SpatRaster on a polygon basis of a sf object. The CRS of the two objects should be the same, however, the function will try to transform the aoi object if that is not the case. See extract for fine controll of the extraction process.

extract_traindata(aoi, predictors, verbose = TRUE, ...)

Arguments

aoi

A sf object with polygons for which pixel values are extracted.

predictors

A SpatRaster object for each layer the pixel values are extracted. The column names of the resulting object will be based on the layer names.

verbose

A logical indicating the level of verbosity.

...

Additional parameters used by extract.

Value

matrix, list, or data.frame

Author

Darius Görgen (MapTailor Geospatial Consulting GbR) info@maptailor.net
Maintainer: MAPME-Initiative contact@mapme-initiative.org
Contact Person: Dr. Johannes Schielein
Copyright: MAPME-Initiative
License: GPL-3