[R-sig-Geo] Unable to read image because a memory limitation

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Jul 9 21:31:58 CEST 2010


On Fri, Jul 9, 2010 at 7:58 PM, Francisco Mauro Gutiérrez
<pmaurogut at hotmail.com> wrote:

> My problem is that R provides an Error message saying that it is not
> possible to allocate a vector of 650 Mb. Does anyone now how can I increase
> the memory limit? It looks like I should increase it to be able to read the
> image.

 It depends on what else your computer is doing. And how much RAM your
machine has. This image has 5x5300x5500 =~ 150 mega-cells, and each
one will take up four bytes as a floating point number (single
precision) so there's your 650Mb. If your operating system doesn't
have 650Mb spare then R will fail at that point. If this is a Windows
PC with 1G of RAM then I can well imagine it not coping - in fact I'd
think if it was a 2G machine then it would still struggle. 4G might do
it, but it will still be slow.

 You might want to try sampling from the raster using the region.dim
and/or output.dim options of readGDAL until you can find a machine
with more RAM.

Barry



More information about the R-sig-Geo mailing list