[Gdal-dev] gdalwarp Transparency Question

Frank Warmerdam warmerdam at pobox.com
Wed Jun 7 21:57:49 EDT 2006


Reinaldo Escada Chohfi wrote:
> Frank,
> 
> I have a question about the usage of
> 
> -scrnodata /value [value...]/:  Set nodata masking values for input 
> bands (different values can be supplied for each band). If more than one 
> value is supplied all values should be quoted to keep them together as a 
> single operating system argument.
> 
> It's not clear to me what's written on the second sentence.  How would I 
> specify to set masking for the following RGB values 0 0 0, 0 0 17, 0 0 
> 22, 0 22 0?
> 
> Would it be --scrnodata "0 0 0" "0 0 17" "0 0 22" "0 22 0"?

Reinaldo,

Gdalwarp only supports a single nodata value.  The verbage is trying to
indicate that you would need to quote the argument if you are providing
a tuple.  So '-srcnodata 0' is fine (and indicates 0 in all bands is nodata)
but if you wanted to indicate that red=0, green=0, blue=17 was nodata you
would need '-srcnodata "0 0 17"'.

But gdalwarp just doesn't support having more than one nodata tuple as
you apparently want to do.  Sorry.

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