microsoft / PlanetaryComputer

Issues, discussions, and information about the Microsoft Planetary Computer
https://planetarycomputer.microsoft.com/
MIT License
183 stars 8 forks source link

Inconsistent Sentinel-2 L2A Raster Footprint Polygons #220

Open scottyhq opened 1 year ago

scottyhq commented 1 year ago

It seems like some STAC Items for Sentinel-2 L2A Use the MGRS Square as the STAC geometry and others use a valid data footprint. Maybe the metadata generation changed at some point in time?

Screenshot 2023-05-22 at 10 15 44 AM

https://planetarycomputer.microsoft.com/api/data/v1/item/map?collection=sentinel-2-l2a&item=S2A_MSIL2A_20151228T050222_R119_T45RVM_20210526T203938

https://planetarycomputer.microsoft.com/api/data/v1/item/map?collection=sentinel-2-l2a&item=S2B_MSIL2A_20230505T045659_R119_T45RVM_20230505T104315

The stactools library suggests using a valid data footprint https://stactools.readthedocs.io/en/stable/api.html#module-stactools.core.utils.raster_footprint

ZirconCode commented 1 year ago

I've also run into this, but I've found correct polygons before and after a broken one, so haven't been able to pin it down.

TomAugspurger commented 1 year ago

I think that the version of https://github.com/stactools-packages/sentinel2 just gets the geometry from the metadata provided by ESA. It'd be good to confirm that first.

We do have the option to generate geometries from the actual rasters themselves, using the raster_footprint utility. That said, I am a bit worried about the computation cost of doing that for a dataset of sentinel-2's size.

cmosig commented 11 months ago

Is there any update on this?

I just posted this but then found this repo later.

TomAugspurger commented 11 months ago

No updates from me. Might be worth reaching out to ESA to report the issue, in case they're able to fix it at the source.

cmosig commented 11 months ago

@TomAugspurger happy to reach out to ESA. What would be their best channel to report the issue? Do you know by chance?