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

Michael Sumner mdsumner at gmail.com
Tue Dec 15 23:45:08 CET 2015


On Friday, December 11, 2015, Stephen Stewart <stephen.stewart85 at gmail.com>
wrote:
> 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!

Try writing to a different physical device (hard drive) than the one you
read from, or use readAll to get the whole stack in memory before the write
step.

M
> 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]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsumner at gmail.com

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list