Re: [R-sig-Geo] Raster math on a stack of large rasters

2017-04-08 Thread Christoph Raab
- Message: 1 Date: Fri, 7 Apr 2017 15:50:06 +0200 From: Benjamin Leutner <benjamin.leut...@uni-wuerzburg.de> To: R-mailing list <r-sig-geo@r-project.org> Subject: Re: [R-sig-Geo] Raster math on a stack of large rasters Message-ID: <205e8b66-4307-5dea-73e

Re: [R-sig-Geo] Raster math on a stack of large rasters

2017-04-07 Thread Melanie Bacou
Also take a look at using raster:: clusterR() in combination with calc() to use multiple cores. This works well if your your calculation function does not require neighboring cells. --Mel. On 04/07/2017 09:50 AM, Benjamin Leutner wrote: You could stick to the native raster format (grd), in

Re: [R-sig-Geo] Raster math on a stack of large rasters

2017-04-07 Thread Benjamin Leutner
You could stick to the native raster format (grd), in which case calc() writes to your final file directly. Of course that doesn't change the file size issue, but saves you the translation step to geotiff. For the file size you could consider restricting the datatype to integer (see

Re: [R-sig-Geo] Raster math on a stack of large rasters

2017-04-06 Thread Gregovich, Dave P (DFG)
I apologize for not including my sessionInfo() previously: > sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252

[R-sig-Geo] Raster math on a stack of large rasters

2017-04-06 Thread Gregovich, Dave P (DFG)
Hi, I am performing a math operation on a stack of large rasters. The code below uses smaller files for illustration and reproducibility. Any alternative way of performing this task that does not create huge temporary files, and perhaps cuts down on processing time, would be greatly appreciated.