I am trying to generate a large set of binary rasters from a multi polygon shapefile.
My snap raster has a large pixel, 0.5 x 0.5 degrees. I don't have major problems rasterizing de large polygons, but, for the small ones, I am writing empty raster (all 0). I am wondering if there is a tolerance parameter in rasterize function by which I will be able to assign 1 to every pixel touched by a polygon (even if the % of the polygon touched is very small).
This is the part of the code
for (i in 1:length(shape)) {
shape.r<-rasterize(shape[i,],snap, background=0)
writeRaster(shape.r, filename = paste(shape[i,]$binomial, sep=""), format = "GTiff", overwrite = T)
}
Thanks! Javier.