stactools-packages / sentinel2

stactools package for Sentinel-2
Other
16 stars 5 forks source link

Set offset (and maybe scale) on assets from source metadata #140

Closed matthewhanson closed 8 months ago

matthewhanson commented 8 months ago

The scale and offset values for the RasterBand extension on the assets use hardcoded values of scale=0.0001 and offset=0.

These are the correct values and there is no expectation that they would change in the Sentinel-2 data, however...the offsets are in the Sentinel-2 source metadata (in product_metadata.xml file -> BOA_ADD_OFFSET_VALUES_LIST).

Not sure if the scales are in the metadata at all, that may have to remain hardcoded.

matthewhanson commented 8 months ago

Turns out this is being done in the code already for offset.