[Gdal-dev] gdalwarp Transparency Question
Frank Warmerdam
warmerdam at pobox.com
Mon Jun 5 14:37:45 EDT 2006
Reinaldo Escada Chohfi wrote:
> Hello,
>
> I'm runing gdalwarp (FWTools 1.0.0a7) to mosaic geotiff images because
> the images are large and I run into memory problems with gdal_merge.
>
> I get some strange results in several mosaics in the overlapping areas
> between images. I use -srcnodata 0 to have gdalwarp do the transparency
> in these overlapping areas.
>
> My question is, if am using -scrnodata 0, will the transparency be made
> when all 3 pixel values are 0, 0, 0 (RGB) or whenever any of the bands
> has a pixel value equal to 0? It looks like I get a transparency only
> in the Blue, sometimes only in the Red or Green bands and the image has
> blue, red or green spots. Do I have to use -scrnodata value "0 0 0" in
> order to get transparency only when RGB are equal to 0, 0, 0?
>
> Thanks in advance for the help.
Reinaldo,
Looking at the code, it seems I implemented UNIFIED_SRC_NODATA as the
default for gdalwarp circa September 2005. A quick checks shows FWTools
1.0.0a7 as being built in early November of 2005. So it should include this.
The UNIFIED_SRC_NODATA enabling forces gdalwarp to only consider a pixel as
nodata if the values match for all bands. So, gdalwarp *should* do what
you want already. That it is not may be a bug in one or more of the
warping logic cases.
Could you first try a newer FWTools and see if the problem persists? If it
does, could you submit a bug report detailing how to reproduce your problem?
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