[Gdal-dev] Using gdal_merge to set pixels to transparent where nodata exists

Frank Warmerdam warmerdam at pobox.com
Tue Jul 18 17:47:00 EDT 2006


John Preston wrote:
> I'm using gdal_merge.py to combine a number of images into one. In
> some cases there will be empty spaces in the output image, which I
> wish to have set as transparent. Is there a way to set the pixels of
> the output image to transparent before the merging starts, I'm
> thinking some sort of -co NAME=PARAM option.

John,

This does not currently exist, and *could* be added.  But I'm hesitant
to wedge too many more features into gdal_merge.py which I'm trying to
superceed with gdalwarp.

But if you feel the need, it should be relatively easy to add a pass
over the file, setting it to some initial nodata value after it's
creation.

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