OpenDataCubePipelines / eugl

Sensor acquisition data quality characterisation
Apache License 2.0
1 stars 4 forks source link

Use gdal cli to apply offset values to S2 data #51

Closed supermarkion closed 2 years ago

supermarkion commented 2 years ago

Hi, How are you.

In this PR:

  1. add a new method grab_offset_dict in metadata.py to extract offset values from zipped XML file (normally copy paste from [wagl] (https://github.com/GeoscienceAustralia/wagl/blob/develop/wagl/acquisition/__init__.py#L697) design).
  2. modify the _sentinel2_fmask moethod. Compare to pre 2021-Nov version. I added three steps in CLI:
    • use grab_offset_dict method to grab offset_dict (band_id -> offset_value).
    • use gdal_edit CLI to attach offset values to VRT metadata
    • use gdal_translate CLI to apply offest values to VRT

This S2 fix have to run with Python-FMask 5.5.

Cheers

Sai