So I have a series of four band NITF images (RGB + Near Infrared). I am currently storing them in a VRT with gdal_translate. Unfortunately, gdal_translate keeps interperting the fourth band as an alpha channel which causes it to be rendered incorrectly later on. How can I force gdal_translate NOT to use fourth band as an alpha mask. The NITF does not currently have any masks and I would prefer if the VRT didn't either.I am aware that using photometric=RGB can help when creating Geotiff, but I don't want to rely on this since the NITFS I am using are massive and translating it to GeoTiff for no reason seems like a waste.
1 Answer
In your gdal_translate command, try setting the creation option (-co) 'ALPHA' value to 'NO':
gdal_translate ... -co ALPHA=NO ...
-
I was under the impression that only work with Geotiff. Regardless, the VRT does not flag it as an alpha channel and I've already tried that. Even then Alpha=NO only works when PHOTOMETRIC=RGB. I've also tried -mask NONE with gdal_translate.– SkylionCommented Jul 15, 2016 at 17:19