[R-sig-Geo] Creating Raster Brick - Very Slow

Stephen Stewart stephen.stewart85 at gmail.com
Fri Dec 11 08:09:28 CET 2015


Hi everyone!

I am currently building 8 raster bricks that are made up of 12,000 raster
files of approximately 500kb each, however it is running incredibly slow!
The code I am using is as follows:

library(raster)
setwd("c:/files")
files <- list.files(getwd(),pattern=".tif")
stack <- stack(files)
brick <- brick(stack,filename = "c:/files/my_raster_brick.tif",format =
"GTiff")

I was wondering if there was a brick equivalent of quick.stack or something
to speed up the process? Alternatively, something outside of R perhaps that
may be more efficient? It is looking like it will take around 50 days per
brick at this rate!

I want to be able to quickly extract vectors of values (using
my_raster_brick[row,col]) so stacks are out of the question as they are way
too slow.

Thanks and have a great break!

Cheers,

Steve

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list