[Gdal-dev] multiple input images to gdal_translate

Frank Warmerdam warmerdam at pobox.com
Wed May 7 23:23:25 EDT 2003


April Shimitz wrote:
> 
> Frank,
>  
>  From the documentation it looks like gdal_translate only takes one 
> input image. Is there any undocumented functionality of the utility to 
> allow multiple input images (mosaic them together to create the output 
> image)? Perhaps this is outside the scope of gdal_translate, but do you 
> have any plans to enhance it to provide this functionality?

April,

The method mostly used for merging multiple datasets currently is
gdal_merge.py.  As long as the inputs are all in the same coordinate system
(though they can be different resolutions).  However, due to the method of
implementation (in python loading each image as a whole) gdal_merge.py has
some sigificant limitations.

The gdalwarp and gdalwarptest can be used to mosaic, but, unlike gdal_merge.py,
they won't scan all the input images, and establish a maximum extent and
preferred resolution for you.   Instead, if you want  mosaic you need to
work out the bounds, coordinate system and resolution yourself and set
it explicitly on the first warp call.   Subsequent warps can mosaic additional
images into the same output file.

What I would do, it modify gdalwarptest (which will eventually become
gdalwarp) to support this automatically.

Subsequent warps can be done with gdalwarp or gdalwarptest into an existing
file.

You can experiment with this now with gdalwarp or gdalwarptest.

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    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list