(optional) terra::SpatRaster object. The template raster should
contain and have the same CRS as the polygons. If template raster is NULL, the
default, uses the default world template raster from make_world_template_raster().
Details
The ID raster will be used to build the aggregation table. Each pixel has a
unique integer value from 1 to the number of pixels in the ID raster.