[Gdal-dev] Re: Mosaic in GDAL Warp

Frank Warmerdam warmerdam at pobox.com
Fri Jun 4 10:52:52 EDT 2004


David W. Lowther wrote:
> Jason,
> 
> Thanks for the reply. Since I'm running on Windows I'd have to set
> python up, which I'm sure is doable. However, before I do that I'd like
> to know if it is possible to mosaic with gdalwarp.

Dave,

You can use gdalwarp to produce a mosaic.  The tricky part is ensuring
you manually set appropriate output bounds and resolution for the mosaic
file when you run gdalwarp the first time.  The nice thing about
gdal_merge.py is it takes care of that for you.

You would need to do something like:

gdalwarp -s_srs EPSG:26715 -t_srs EPSG:109999 –of GTIFF -co 'TFW=YES' \
          -te 100000 250000 150000 300000 -tr 1.0 1.0 \
          e:\project\corps\38095a21.tif e:\project\corps\out\a38095.tif

Then subsequent files should just need something like:

gdalwarp -s_srs EPSG:26715 e:\project\corps\38095a22.tif e:\project\corps\out\a38095.tif

Note, don't include any creation options for the output file or you will get
the message about having creation options when the output file already exists.

As noted above, setting the "-te" (target extents) and -tr (target resolution)
arguments right the first time is a hassle.  You might even find it a good
idea to transform all the files seperately once and get the extents of them
all.  Then start the process over creating the output mosaic with the full
extents.

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