[gdal-dev] 4th band as ALPHA on warp

Even Rouault even.rouault at spatialys.com
Sun Aug 7 13:38:17 PDT 2016


Le dimanche 07 août 2016 19:20:05, Even Rouault a écrit :
> Le samedi 06 août 2016 15:20:54, Fernando Ribeiro a écrit :
> > Dear list,
> > 
> > Currently we are working with 4 band tifs, first 3 bands as normal RBG
> > and the 4th as IR. On performing a warp operation from and to a VRT,
> > GDAL seems considering the 4th band as alpha, resulting in full black
> > pixels if 4th band value =0.
> 
> gdalwarp will consider the 4th band as alpha... only if it is effectively
> tagged as alpha in the source. You can check it with gdalinfo
> 
> > Some attempts were made to solve this issue, so far without success:
> > 
> > - Using the warp creation options PHOTOMETRIC=RGB and ALPHA=NO
> 
> This will not influence the warping kernel.
> 
> > - Manually editing the source VRT and replace Alpha color interpretation
> > to Undefined
> 
> This one should work. Strange that this doesn't work for you.
> 
> > Does anyone have more suggestions?

I've just committed an improvement in trunk: "gdalwarp: add a -nosrcalpha 
option to wrap the alpha band as a regular band and not as the alpha band"

> > 
> > Thank you

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list