Function to extract directly the raster value of provided points
Source:R/utils-spatial.R
get_rastervalue.Rd
This function simply extracts the values from a provided
SpatRaster
, SpatRasterDataset
or SpatRasterCollection
object. For
points where or NA values were extracted a small buffer is applied to try and
obtain the remaining values.
Arguments
- coords
A
data.frame
,matrix
orsf
object.- env
A
SpatRaster
object with the provided predictors.- ngb_fill
logical
on whether cells should be interpolated from neighbouring values.- rm.na
logical
parameter which - if set - removes all rows with a missing data point (NA
) from the result.
Value
A data.frame
with the extracted covariate data from each provided
data point.
Details
It is essentially a wrapper for terra::extract
.