[FWTools] gdal_merge with nodata value
Bryan Keith
bryan at geomega.com
Thu Oct 26 17:21:40 EDT 2006
Frank Warmerdam wrote:
> Bryan Keith wrote:
>> So I gave up on Windows and tried on linux with an old version of
>> FWTools (1.0.0a7) and an old version of gdal_merge.py (Revision 1.21),
>> and I got the same memory error that I ended up with on windows (albeit
>> much more quickly). Now I'm thinking that specifying the nodata flag
>> does indeed use much more memory than without it and that I'll have to
>> bump up available memory to get these files to process.
>
> Bryan,
>
> The gdal_merge.py script does load the entire source image into memory.
> If you use nodata values, it also creates multiple copies in memory as
> it does the various operations. So gdal_merge.py is really only appropriate
> for modest sized input files.
>
> Ideally you should be using gdalwarp. It supports nodata values, can handle
> a bunch of input files at once, and should not suffer these memory problems.
>
> Unfortunately the arguments are non-trivially different than gdal_merge.py,
> so you may need to do some fiddling about.
>
> Best regards,
Frank,
Thank you. That did the trick. gdalwarp took a while to run, but there
were no memory problems.
Bryan
More information about the FWTools
mailing list