Skip to content
Prev 17435 / 29559 Next

Alternative to zonal for large images

Hi - Are there alternatives to using the raster package "zonal" function 
for large images when using functions for the "stat" parameter? The 
canned functions like 'mean' work well but I would like to write my own 
functions to calculate standard deviation and other statistics.

I tried "extract" using polygons to define the zones but that is very, 
very slow since I have ~40,000 polygons. Are there other alternatives? 
My image is about 5000 x 6000 pixels x 3 bands.

Any thoughts would be appreciated.

Ned