View source: R/create_training_data.R
extract_values | R Documentation |
Extracts values for all layers of a raster for a set of points or polygons. If
extract_values(
raster,
points,
extraction_method = "all",
extraction_layer = NULL,
return_type = "table",
na.rm = TRUE,
...
)
raster |
A SpatRaster of explanatory variables with a layer for each variable to extract. |
points |
SpatVector of points to use for extraction. If polygons, the point chosen for extraction will be determined via the extraction_method parameter. |
extraction_method |
Method to use for extracting values from each point: "all", "centroid", "max", or "min". Ignored if extractionPoints is not polygon |
extraction_layer |
Layer to use for extracting value. Ignored if extraction_method = "centroid". Ignored if extraction_method is "all" or "centroid" or if extractionPoints is not polygon. |
return_type |
|
na.rm |
Remove any cells with NA values? |
... |
Additional arguments passed onto |
A dataframe of extracted raster values with an additional "class" column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.