[R-sig-Geo] Raster in parallel computing?

Camilo Mora cmora at dal.ca
Wed Jan 8 08:36:49 CET 2014


Hi everyone,

I am using the package "raster" to interpolate a large number of  
rasters (~1million) of different resolutions to a unique 1degree  
resolution grid and wonder if you know if it is possible to do this in  
parallel computer?.

My code (example below) works like a charm but it will take 30 days to  
process all the rasters. Sadly, the process only uses one core of my  
computer. I wonder if there is a way to run this code (example below)  
in parallel computer?.

Thanks,

Camilo

####TEST CODE######
library (raster)

#creates 3 test rasters
a <- raster(nrow=3, ncol=3)
a[] <- 1:9

b <- raster(nrow=3, ncol=3)
b[] <- 10:18

c <- raster(nrow=3, ncol=3)
c[] <- 19:27

#concatenates the rasters
d<-brick(a,b,c)

#creates a raster at a different resolution
s <- raster(nrow=10, ncol=10)

#interpolates data from the brick to the new resolution
s <- resample(d, s, method='bilinear')



More information about the R-sig-Geo mailing list