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

BUG: Fix multi-tile Planet data #45

Closed
remi-braun opened this issue Aug 26, 2022 · 4 comments
Closed

BUG: Fix multi-tile Planet data #45

remi-braun opened this issue Aug 26, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@remi-braun
Copy link
Member

remi-braun commented Aug 26, 2022

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 remi-braun added bug Something isn't working 0.17.0 labels Aug 26, 2022
@remi-braun remi-braun changed the title BUG: Fix multi-tile PlanetScope data BUG: Fix multi-tile Planet data Sep 1, 2022
@remi-braun
Copy link
Member Author

Same issue for:

  • SkySat Scene
  • PlanetScope L3A (Ortho tiles)
  • PlanetScope L3B (PS Scene)

@remi-braun
Copy link
Member Author

remi-braun commented Sep 15, 2022

This is a complicated issue.

  • EOReader rule is (for now ?) to handle only single products
  • Those products are like several products in only one, with several metadata BUT they have been ordered and distributed like if they were merged

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

  • the metadata handled by EOReader should be quite easy
  • the synthetic XML metadata may be a bit harder

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

  • identifier: 20210902_093940_06_245d_3B_AnalyticMS_8b vs 20210902_093942_54_245d_3B_AnalyticMS_8b
    ✔️ Choose the latest for the datetime and set XX for satellite_id
    Idem for fileName
  • acquisitionDate: 2021-09-02T09:39:40+00:00 vs 2021-09-02T09:39:42+00:00
    ✔️ Choose the latest
    Idem for archivingDate, beginPosition, endPosition, acquisitionDateTime
  • incidenceAngle: 4.338212e+00 vs 4.334479e+00
    ✔️ Round to 10-1
    Idem for illuminationAzimuthAngle , illuminationElevationAngle, azimuthAngle, spaceCraftViewAngle
  • coordinates
    ✔️ Create a new extent grouping all others
  • pos, topLeft, topRight, bottomRight and bottomLeft lat/lon
    ✔️ From new extent
  • numRows and numColumns
    ✔️ Compute from VRT
  • reflectanceCoefficient are product dependant
    ❓ Add them in the VRT file (if possible)

Solution

1️⃣ Create VRT with the corresponding reflectance coefficients, remove stats and coefficients and set the bands in Float32
2️⃣ Take the latest acquired subproduct metadata file
3️⃣ Apply the described changes on this XML

@remi-braun
Copy link
Member Author

remi-braun commented Sep 15, 2022

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

  • coordinates
    ✔️ Compute from the VRT
  • id: 20220706_060910_ssc19d1_0005 vs 20220706_060910_ssc19d1_0006
    ✔️ set X (or 0) for scene_id
  • clear_confidence_percent
    ✔️ Keep the lowest
  • clear_percent, satellite_azimuth shadow_percent, view_angle
    ✔️ Compute the mean

@remi-braun
Copy link
Member Author

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

  • identifier: 5876232_3261410_2022-08-23_2233_BGREN_Analytic vs 5876232_3261411_2022-08-23_2233_BGREN_Analytic
    ✔️ Choose the latest for the datetime
    Idem for acquisitionDate and fileName
  • tileId: 3261410 vs 3261411
    ❓ Choose what ? Empty the field ?
  • incidenceAngle: 4.338212e+00 vs 4.334479e+00
    ✔️ Round to 10-1
  • coordinates
    ✔️ Create a new extent grouping all others
  • pos, topLeft, topRight, bottomRight and bottomLeft lat/lon
    ✔️ From new extent
  • numRows and numColumns
    ✔️ Compute from VRT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant