[R-sig-Geo] Antw: change projection of large raster file

Robert Hijmans r.hijmans at gmail.com
Wed Jun 22 18:08:37 CEST 2011


Apart from the multicore that Matteo mentioned, there are other things that
might speed things up.

first: this is a bad idea. 

setOptions(chunksize = 1e+04, maxmemory = 1e+06) 

By doing this you are giving the function very little memory to work this. I
would only do this if the function fails becaise of memory problems. In
other cases it might be good to increase the default values of these setting
to speed things up.

you have 

test <- raster("glc2000_v1_1") #reads the GLC data

And then you want to project to the universe of grid100

But what cell size etc? For a large raster like this, I would do something
like

r <- raster(grid100) # to convert the SpatialGrid into a raster 
r <- raster(r) # remove the values

now use nrow, ncol, or res to set the resolution you desire. And then do

test2 <- projectRaster(test, r)  

Robert

--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/change-projection-of-large-raster-file-tp6499121p6504895.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list