0

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
  • Edit your vrt file and set color interpretation of all bands to Unknown. Perhaps that helps.
    – user30184
    Commented Jul 15, 2016 at 20:20

1 Answer 1

1

In your gdal_translate command, try setting the creation option (-co) 'ALPHA' value to 'NO':

gdal_translate ... -co ALPHA=NO ...
1
  • 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.
    – Skylion
    Commented Jul 15, 2016 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.