[Gdal-dev] gdal_merge.py

Frank Warmerdam warmerdam at pobox.com
Wed Apr 5 21:30:49 EDT 2006


John Cartwright wrote:
> Hello All,
> 
> I'm trying to merge a set of gifs w/ gdal_merge.py.  The generated gif 
> cannot be displayed in a browser "because it contains errors".
> 
> gdalinfo seems to think it's OK:
> 
> Driver: GTiff/GeoTIFF
> ...
> 
> Same thing happens w/ the GTiff format. Is there something I'm missing 
> here or is this the expected behaviour?

John,

I think the problem is that the output file from the merge is a GeoTIFF
and browsers don't know what to do with it.  If you want a different output
format you would have to use the -of switch to gdal_merge.py, but in any
event I don't think it can output directly to gif since gif can only be
created by copying from another file (it is a "create copy" format).

So just translate your GeoTIFF back to GIF.

Also, I think you will need to rerun the merge with the -pct switch
so that the color table of the first input file will be copied to the
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 Gdal-dev mailing list