-
Notifications
You must be signed in to change notification settings - Fork 4
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
t.sentinel.import: Add option to add a band offset after importing S-2 data #23
Conversation
Since Sentinel-2 <a href="https://forum.step.esa.int/t/info-introduction-of-additional-radiometric-offset-in-pb04-00-products/35431">Processing Baseline 4.0.0</a>, a systematic offset has been introduced to all reflectance values. | ||
To account for this, the <b>offset</b> option allows the user to indicate how reflectance data should be corrected (e.g. -1000). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Sentinel-2 <a href="https://forum.step.esa.int/t/info-introduction-of-additional-radiometric-offset-in-pb04-00-products/35431">Processing Baseline 4.0.0</a>, a systematic offset has been introduced to all reflectance values. | |
To account for this, the <b>offset</b> option allows the user to indicate how reflectance data should be corrected (e.g. -1000). | |
Since Sentinel-2 <a href="https://forum.step.esa.int/t/info-introduction-of-additional-radiometric-offset-in-pb04-00-products/35431">Processing Baseline 4.0.0</a>, a systematic offset has been introduced | |
to all reflectance values.<br> | |
To account for this, the <b>offset</b> option allows the user to indicate how reflectance data should | |
be corrected (e.g. -1000). |
(break long lines, see https://github.com/OSGeo/grass/blob/main/doc/development/style_guide.md#markup-style-guide - "More notes on markup")
# % key: offset | ||
# % type: integer | ||
# % required: no | ||
# % description: Offset to add to the Sentinel bands to due to specific processing baseline (e.g. -1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# % description: Offset to add to the Sentinel bands to due to specific processing baseline (e.g. -1000) | |
# % description: Offset to add to the Sentinel-2 bands to due to specific processing baseline (e.g. -1000) |
Perhaps only S2 related?
Since Sentinel-2 Processing Baseline 4.0.0 a systematic offset has been introduced to all reflectance values. This offset is currently
1000
and can be read from the scene metadata if available.In this PR, an option to indicate an offset number is given to the user. The offset is then added to all imported bands, and via a small hack, the
description.json
that holds band metadata that is relevant for e.g.i.sentinel.mask
is preserved.Important:
An ideal solution would obviously be to automatically parse the offset from the scene metadata and implement the offset addition directly in i.sentinel.import. This is not done for the following reasons:
i.sentinel.import
, the metadata is read after importing the data itself - changing this would be a major refactoring of the modulepattern
, it is up to the user to make sure that only relevant bands (and not quality layers etc.) are imported. Fori.sentinel.import
, a blind application of the offset would not be a valid solution, so an internal mechanism would have to make sure that only reflectance bands are affected - again this requires a major refactoringi.sentinel.import
is foreseen, then it would make sense to directly make use of the GDAL Sentinel-2 driver.--> in essence, this PR represents a small-effort workaround for an issue that would require much more effort for a sustainable solution