[gdal-dev] Re: GDAL WriteArray Memory Error (Python)

2011-01-17 Thread hairymapper
Solved. The error in my previous post occurs because of the way gdal_array.BandWriteArray() tries to catch unknown datatype errors. If gdal.BandWriteArray() receives an numpy array with an unrecognized data type it defaults to using numpy.float64 data type for the output (presumably in the hope t

[gdal-dev] GDAL WriteArray Memory Error (Python)

2011-01-14 Thread hairymapper
Hi, When doing the following in Windows XP, I get an error: dst_ds.GetRasterBand(band_num).WriteArray ( rasterarray ) Traceback (most recent call last) ... File "C:\Python26\lib\site-packages\osgeo\gdal_array.py", line 160, in BandWriteArray array = array.astype( numpy.float64 ) MemoryErro