sertit / eoreader

Remote-sensing opensource python library reading optical and SAR sensors, loading and stacking bands, clouds, DEM and spectral indices in a sensor-agnostic way.
https://eoreader.readthedocs.io/en/latest/
Apache License 2.0
271 stars 22 forks source link

BUG: Fix multi-tile Planet data #45

Closed remi-braun closed 1 year ago

remi-braun commented 1 year ago

Some PlanetScope data may come as a bundle of several tiles: 2022-08-26_09h36_51

For now, only the first one is processed, so add a mosaicing process before anything (create VRT of the stacks)

Maybe it can be difficult to manage the metadata (name etc.) -> create synthetic metadata? How to manage cloud cover ?

remi-braun commented 1 year ago

Same issue for:

remi-braun commented 1 year ago

This is a complicated issue.

How to handle that? 1️⃣ Create a VRT, but how do we merge the metadata ? (seems the most natural) ✔️ 2️⃣ Create several products but this needs a global change in the Reader().open() function (outputs a list of products instead of one product) ❌ 3️⃣ Only manage the first sub-product (with a warning) ❌ (this is the current and wrong behaviour)

So there is a question of how to merge the metadata

Here is the difference between two metadata files for two subproducts of the same product (PSScene) : https://diffonline.net/Qndq9IrvW6 Workaround for the changes:

Solution

:one: Create VRT with the corresponding reflectance coefficients, remove stats and coefficients and set the bands in Float32 :two: Take the latest acquired subproduct metadata file :three: Apply the described changes on this XML

remi-braun commented 1 year ago

Same work for SkySatScene : https://diffonline.net/Qndq9IrvW6 Workaround for the changes:

remi-braun commented 1 year ago

Same work for PSOrthoTile : https://diffonline.net/5nJ6eavnA9 Workaround for the changes: