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

Robert J. Hijmans r.hijmans at gmail.com
Sat Jul 10 05:18:43 CEST 2010


Francisco,

You have not said why you want to read the image into memory, but
chances are that you do not need to, if you use the 'raster' package
to explore or manipulate your data.

Robert

On Fri, Jul 9, 2010 at 12:31 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
> 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
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list