R/coverage_fraction.R
coverage_fraction.Rd
Compute the fraction of raster cells covered by a polygon
# S4 method for class 'RasterLayer,sf'
coverage_fraction(x, y, crop = FALSE)
# S4 method for class 'RasterLayer,sfc_MULTIPOLYGON'
coverage_fraction(x, y, crop)
# S4 method for class 'RasterLayer,sfc_POLYGON'
coverage_fraction(x, y, crop)
# S4 method for class 'SpatRaster,sf'
coverage_fraction(x, y, crop = FALSE)
# S4 method for class 'SpatRaster,sfc_MULTIPOLYGON'
coverage_fraction(x, y, crop)
# S4 method for class 'SpatRaster,sfc_POLYGON'
coverage_fraction(x, y, crop)
a list with a RasterLayer
for each feature in y
.
Values of the raster represent the fraction of each
cell in x
that is covered by y
.