[R-sig-Geo] Alternative to zonal for large images

Ned Horning horning at amnh.org
Tue Feb 12 04:44:15 CET 2013


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



More information about the R-sig-Geo mailing list