[gdal-dev] From Linux to Windows (2)

Frank Warmerdam warmerdam at pobox.com
Tue Jul 15 08:58:18 EDT 2008


Yann Chemin wrote:
> Hello again,
> 
> I have a very simple GDAL-python code (LoadFile() then NDVI calculations).
> when I run it on my laptop (Debian/Sid 2Gb RAM) there is no problem,
> only few seconds for a 65Mb (x2) image inputs.
> When I do the same in Windows, it gets stuck in the NDVI equation saying:
> 
> "(nirchan-redchan)/(nirchan+redchan)
> MemoryError"
> 
> The Windows Desktop I use is 4Gb RAM and is loaded with standard python+GDAL.

Yann,

I presume this is an issue with how windows handles address space and that
the process is unable to allocate more 32bit addressable RAM on windows
even though there is lots of physical RAM left.  I'm not exactly clear on
why you run into this on Windows and not on Linux but their memory
management does differ significantly.

My suggestion is that you alter your script to operate on smaller chunks
of the file at a time which will unfortunately complicate it quite a bit.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list