[Gdal-dev] GDAL_MERGE Memory Error

Reinaldo Escada Chohfi rec at geodesign.com.br
Thu Dec 1 20:39:23 EST 2005


Hello everyone,

I'm running gdal_merge.py and get the following memory allocation error 
when using the -n 0 flag:

Traceback (most recent call last):
   File "gdal_merge.py", line 478, in ?
     fi.copy_into( t_fh, band, band, nodata )
   File "gdal_merge.py", line 288, in copy_into
     nodata_arg )
   File "gdal_merge.py", line 110, in raster_copy
     nodata )
   File "gdal_merge.py", line 147, in raster_copy_with_nodata
     nodata_test = Numeric.equal(data_src,nodata)
MemoryError: can't allocate memory for array

I run the program twice using the same input datasets when making a mosaic 
to extract two images with the -n 0 flag.  I get one image out. However, I 
get the above error when trying to get the second image out.  I get the 
same error when trying to do the same operation on other inputs.  The 
output images are all the same size about 500 MB.

I'm running gdal_merge.py on a AMD 64-bit machine with 4 GB of RAM and lots 
of disk space.

Please let me know how to fix this problem.

Thanks in advance.

Reinaldo




More information about the Gdal-dev mailing list