Rasterize polygons using fasterize

fasterizeFromSp(sp, raster, fieldName)

Arguments

sp

a shapefile to rasterize

raster

the template raster to use

fieldName

the field to use (will be ignored if the shapefile has no fields)

Value

RasterLayer