[R-sig-Geo] Stack, brick (or other data object) to query large amounts of raster data

pgalpern pgalpern at gmail.com
Wed Nov 9 21:19:30 CET 2011


Hello!

   Trying to decide the best way to store a large amount of data in a 
function I am writing using the raster package.

   The goal is speed.  I need to flexibly and efficiently handles cases 
where 10 to 5000 copies of a raster are required.  The raster that 
requires replication would typically vary in size from 400 to 4000 
pixels in each dimension.

   Fortunately I do not need to perform operations on these rasters, but 
need only to sequentially query values from them (this appears to be the 
rate limiting step).  What would be the most efficient data structure to 
handle this?

   The stack appears to work much faster than a brick in limited 
trials.  Would it be more efficient to use another data structure 
altogether (data is not sparse).  Obviously in many cases this is going 
to require disk swapping.  Any ideas?

Thanks,
Paul

-- 
Paul Galpern, PhD Candidate
Natural Resources Institute
70 Dysart Road
University of Manitoba
Winnipeg, Manitoba, Canada R3T 2M6
http://borealscape.ca



More information about the R-sig-Geo mailing list