[GDAL Metadata] confused ENVI data gain with GDAL data scale
How to reproduce:
Open enmap_berlin.bsq GDAL Metadata.
The reported offset and scale values are not those of the GDAL metadata model, but those from the ENVI header:
Note that GDAL (and even the ENVI software itself) are ignoring the offset/gain information from the ENVI header.
Note that GDAL band scale for enmap_berlin.bsq is 1:
Actual data is scaled between 0 and 10000:
Comments (8)
-
reporter -
- changed status to duplicate
Duplicate of
#1157. -
and what’s the bug here?
-
reporter You present ENVI Data Offset and Scale as if it is relevant for the user. But it’s not really relevant, because QGIS and all algorithms will ignore those.
GDAL Offset and Scale would be relevant for the user, because QGIS and the algorithms will use. Those values aren’t presented.
This will confuse users.
-
reporter - changed status to open
-
I think it is the context of a usecase which makes a metadata information relevant or not.
The table shows band-specific metadata, and in general metadata that is somehow stored with the image. This does not necessarely mean that the metadata is used by any API / application.
For example, if an ENVI header file defines multiple offsets (data offset values
anddata reflectance gain values
), it should be shown here, no matter GDAL or QGIS use it to scale the pixel values. -
reporter Fair enough, but why aren’t you showing the (relevant) GDAL Offset and Scale values?
-
- changed status to resolved
GDAL Band metadata: renamed to scale and offset and shows ENVI scale and gain (if available) resolves
#1159, resolves#1157Signed-off-by: jakimowb benjamin.jakimow@geo.hu-berlin.de
→ <<cset 463e40dfd792>>
- Log in to comment
Also note that a data gain of 10000 in ENVI is equal to a a data scale of 1e-4 in GDAL.