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

Even Rouault even.rouault at spatialys.com
Sun Aug 7 10:20:05 PDT 2016


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?
> 
> Thank you

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


More information about the gdal-dev mailing list