Open janzandr opened 1 month ago
It would be nice that saving such scaled data does preserve the original data types used. E.g. if data is int + scaling, the export algorithm should try the same.
With "export algorithm" you mean the "Save raster layer as" / "Translate raster layer" algo?
Yes.
Both algos use gdal_translate, which preserves the data type and the scaling factor.
BUT, if you are using any other algo for processing the data, the data is read by QGIS API, which will scale the data on-the-fly.
After importing satellite data into the EnMAP-Box, reflectance data is scaled between 0 and 1 Probably not the scope of this issue, but do our import algos perform a "hard scale", i.e. writing double instead ints?
After importing satellite data into the EnMAP-Box, reflectance data is scaled between 0 and 1 Probably not the scope of this issue, but do our import algos perform a "hard scale", i.e. writing double instead ints?
No, the data is stored as ints with scaling factors. USING the data in QGIS will on-the-fly scale the data into 0 to 1 floats.
Discussed with @jakimowb.
After importing satellite data into the EnMAP-Box, reflectance data is scaled between 0 and 1. Exporting this data into GTiff or ENVI file, would result in floating-point data. It is proposed to implement an algorithm for storing a raster using an integer data type using scaled reflectance encoding (e.g. multiply the data by 10000 and cast it to Int16).
The following parameters are describing a scaled reflectance encoding: