This function converts a SpatialPolygonsDataFrame to a RasterLayer using GDAL.
It is expected to be faster than rasterize for large datasets.
However, it will be significantly slower for small datasets because the data will need to be written and read from disk.
Usage
rasterizeGDAL(x, y, field = NULL)
Arguments
x
SpatialPolygonsDataFrame object.
y
RasterLayer with dimensions, extent, and resolution to be used as a template for new raster.
field
character column name with values to burn into the output raster. If not supplied, default behaviour is to burn polygon indices into the RasterLayer.