rasterize_polygons | R Documentation |
Returns a raster whose values indicate the index of the polygon covering
each cell. Where multiple polygons cover the same cell, the index of the
polygon covering the greatest area will be used, with the lowest index
returned in the case of ties. Cells that are not covered by any polygon,
or whose total covered fraction is less than min_coverage
, will be
set to NA
.
## S4 method for signature 'sf,RasterLayer'
rasterize_polygons(x, y, min_coverage = 0)
## S4 method for signature 'sf,SpatRaster'
rasterize_polygons(x, y, min_coverage = 0)
x |
a |
y |
a (possibly empty) |
min_coverage |
minimum fraction of a cell that must be covered by polygons to be included in the output |
a RasterLayer
or SpatRaster
, consistent with the type of y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.