Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add algorithm for scaled reflectance encoding #978

Open
3 tasks
janzandr opened this issue Sep 18, 2024 · 7 comments
Open
3 tasks

add algorithm for scaled reflectance encoding #978

janzandr opened this issue Sep 18, 2024 · 7 comments
Assignees
Labels
feature request New feature or request

Comments

@janzandr
Copy link
Contributor

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:

  • input range (e.g. 0 to 1 as default)
  • output range (e.g. 0 to 10000 as default)
  • data type ( Int16, Byte
@janzandr janzandr added the feature request New feature or request label Sep 18, 2024
@janzandr janzandr added this to the Future Release milestone Sep 18, 2024
@janzandr janzandr self-assigned this Sep 18, 2024
@jakimowb
Copy link
Contributor

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.

@janzandr
Copy link
Contributor Author

janzandr commented Sep 30, 2024

With "export algorithm" you mean the "Save raster layer as" / "Translate raster layer" algo?

@jakimowb
Copy link
Contributor

Yes.

@janzandr
Copy link
Contributor Author

Both algos use gdal_translate, which preserves the data type and the scaling factor.

@janzandr
Copy link
Contributor Author

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.

@jakimowb
Copy link
Contributor

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?

@janzandr
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants