exactextractr (version 0.10.0)

exact_resample: Resample a raster to a new grid

Description

Resample a raster to a new grid

Usage

# S4 method for RasterLayer,RasterLayer
exact_resample(x, y, fun, coverage_area = FALSE)

# S4 method for SpatRaster,SpatRaster exact_resample(x, y, fun, coverage_area = FALSE)

Value

a resampled version of x, returned as a RasterLayer or

SpatRaster, depending on the values of x and y

Arguments

x

a RasterLayer or SpatRaster to be resampled

y

a raster of the same class as x with a grid definition to which x should be resampled

fun

a named summary operation or R function to be used for the resampling

coverage_area

use cell coverage areas instead of coverage fractions in fun