GDAL incorrectly sets irepband information when saving nitf->nitf
|Reported by:||jeepingben||Owned by:||warmerdam|
I found this while using GDAL to convert from uncompressed NITF to JPEG2000 compressed NITF, but it happens when converting uncompressed nitf to uncompressed nitf as well.
The setting of IREP and IREPBAND seems to be based on a series of special cases and for any case that doesn't match the special case IREP is set to MONO and IREPBAND is set to M for all bands.
The attached file has IREP MULTI and GRBX band-order. If I change the bandorder to RGBX, it works as expected. This was tested using gdal-translate from a recent SVN build.
From the project I am working on, I tried explicitly setting the color interpretation for the bands before writing and it did not help.