[FWTools] Gdal_merge on large (50Gb) file
Frank Warmerdam
warmerdam at pobox.com
Sun Apr 9 21:29:46 EDT 2006
Shaun Kolomeitz wrote:
> Dear FWtools list,
>
> I am having problems getting a large merge fire-up using the gdal_merge command.
>
> I have three IMG (HFA format) files in the same projection (lat/lon) each 22Gb, 20Gb and 6Gb that I am trying to merge into a single image.
>
> I keep getting the following -
>
> Q:\satimages>gdal_merge -o qldg.img -of HFA -v z54gclip.img z55gclip.img z56gclip.img
>
> Filename: z54gclip.img
> File Size: 48826x154049x3
> Pixel Size: 0.000130 x -0.000130
> UL:(137.590396,-9.999789) LR:(143.918997,-29.966909)
> Copy 0,0,48826,154049 to 0,0,48826,154049.
> Traceback (most recent call last):
> File "C:\PROGRA~1\FWTOOL~1.0B2\bin\gdal_merge.py", line 488, in ?
> fi.copy_into( t_fh, band, band, nodata )
> File "C:\PROGRA~1\FWTOOL~1.0B2\bin\gdal_merge.py", line 297, in copy_into
> nodata_arg )
> File "C:\PROGRA~1\FWTOOL~1.0B2\bin\gdal_merge.py", line 130, in raster_copy
> t_xsize, t_ysize, t_band.DataType )
> File "C:\PROGRA~1\FWTOOL~1.0B2\pymod\gdal.py", line 845, in ReadRaster
> buf_xsize, buf_ysize,buf_type)
> MemoryError
>
> Any suggestions ?
Shaun,
gdal_merge operates by loading each input image into RAM before writing it
to the merged file. My suggestion would be to run gdalwarp to build your
mosaic.
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 OSGF, http://osgeo.org
More information about the FWTools
mailing list