Fast extract
Extract data from a Raster
object.
fast_extract(x, y, ...) ## S4 method for signature 'Raster,SpatialPolygons' fast_extract(x, y, fun = "mean", ...) ## S4 method for signature 'Raster,SpatialPoints' fast_extract(x, y, fun = "mean", ...) ## S4 method for signature 'Raster,SpatialLines' fast_extract(x, y, fun = "mean", ...) ## S4 method for signature 'Raster,sfc' fast_extract(x, y, fun = "mean", ...) ## S4 method for signature 'Raster,sf' fast_extract(x, y, fun = "mean", ...)
This function is simply a wrapper that uses
raster::extract()
to extract data for
SpatialPoints
and
SpatialLines
and
non-polygonal sf::sf()
data, and
exactextractr::exact_extract()
for
SpatialPolygons
and
polygonal sf::sf()
data.
matrix
containing the summary amount of each feature
within each planning unit. Rows correspond to different spatial features
in the argument to y
and columns correspond to different raster
layers in the argument to x
.
# load data data(sim_pu_sf, sim_features) # extract data result <- fast_extract(sim_features, sim_pu_sf) # show result print(head(result))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.