support bad band metadata stored at band level
As described in the Glossary, we want to support bad band specification at band-level:
https://enmap-box.readthedocs.io/en/latest/general/glossary.html#term-bad-band-multiplier
The GDAL metadata isn’t concidering this correctly:
Comments (10)
-
-
Probably already solved by extending the lookup patterns.
Please re-test. If possible, provide a unit test that starts opens the layer properties for the data you mean. -
reporter Find a snippet here: QGISPlugIns/enmap-box/snippets/issues/issue1089.py
from osgeo import gdal from enmapbox import EnMAPBox, initAll from enmapbox.exampledata import enmap from enmapbox.testing import start_app from enmapboxprocessing.rasterwriter import RasterWriter from qgis._core import QgsRasterLayer # create raster with a bad band filename = 'enmap.vrt' ds = gdal.Translate(filename, enmap) writer = RasterWriter(ds) writer.setBadBandMultiplier(0, 2) del writer, ds layer = QgsRasterLayer(filename) qgsApp = start_app() initAll() enmapBox = EnMAPBox(None) enmapBox.onDataDropped([layer]) qgsApp.exec_()
It’s not fully clear, what the meaning of “False” is in your dialog, but I guess the bad band (i.e. the second band) should show True, and all other bands False. In that regard, it is still not working:
-
Note the bbl in the ENVI hdr follows the opposite convention: 1 for correct bands, 0 for bad bands:
“Lists the bad band multiplier values of each band in an image, typically 0 for bad bands and 1 for good bands.”
https://www.l3harrisgeospatial.com/docs/enviheaderfiles.html
-
reporter Yes, turning a 1 into False is a bit misleading.
-
@Andreas Janz thx for fixing the
RasterWriter
.setBadBandMultiplier
bug. I was wondering why only band 2 is set to False -
- changed status to resolved
-
- changed status to open
-
reporter Note that I will use “bbl” as key for bad band multiplier (see
#1095). -
- changed status to resolved
resolves
#1089→ <<cset f005732a2ddd>>
- Log in to comment
to be discussed, see comments
#1088