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

Camilo Mora cmora at DAL.CA
Wed Jan 8 19:00:17 CET 2014


Thank you Roger,

Yes I should have mentioned that I have looked extensively over this  
question. Curiously, Jonathan From "spatial.tools" provided me with  
some advice as his tool at the current time does not run the function  
"resample".

Thanks again,

Camilo



Quoting Roger Bivand <Roger.Bivand at nhh.no>:

> Did you notice the thread started yesterday that appears to meet your need:
>
> https://stat.ethz.ch/pipermail/r-sig-geo/2014-January/020156.html
>
> It is always a good idea to look at the list archives, a search on:
>
> "list:R-sig-geo raster parallel"
>
> gives a number of potentially interesting hits. You could then  
> preface your posting by saying that you have already tried some  
> possible solutions, and would like help with them.
>
> Roger
>
> On Wed, 8 Jan 2014, Camilo Mora wrote:
>
>> 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')
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> -- 
> Roger Bivand
> Department of Economics, Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand at nhh.no
>
>
>



More information about the R-sig-Geo mailing list