microsoft / PlanetaryComputer

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

Sentinel-2 imagery exhibiting visual striping over low-contrast surface? #326

Open trchudley opened 9 months ago

trchudley commented 9 months ago

I'm attempting to use the Planetary Computer to download Sentinel-2 band 8 images over a region of high contrast - specifically, a crevasse field on the Greenland Ice Sheet located at:

{'type': 'Polygon',
 'coordinates': (((-46.75340486007154, 69.39882887902311),
   (-46.76121369699498, 69.48827331262883),
   (-46.88874855950341, 69.48684820263249),
   (-46.880375047413665, 69.39741047177587),
   (-46.75340486007154, 69.39882887902311)),)}

However, it is apparent that when I do so, there are artificial linear 'tiger stripes' visible in the imagery that are particularly problematic for analysing crevasse fields:

samples_mpc

This is not visible when downloading the same series of images from an alternative source (Google Earth Engine).

samples_gee

(Note that, due to slightly different search methods, only the central scenes are identical between these two figures, but I hope it highlights the difference clearly).

These images are being downloaded using stackstac and reprojected into CRS 3413 (although the striping remains whether I reproject or not, and regardless of what reprojection method I use). The stripes are also visible in other bands.

I wonder if you are aware what the problem could be here? Is it something to do with bit depth or compression artefacts? Or with stackstac as a download interface for MPC?

Kind regards, Tom

P.S. For reference, the images I have visualised from MPC above are as follows:

S2A_MSIL2A_20210804T151911_R068_T23WMT_20210805T004706
S2B_MSIL2A_20220801T150809_R025_T22WFC_20220802T094927
S2B_MSIL2A_20230809T151809_R068_T22WFC_20230809T221549
TomAugspurger commented 8 months ago

Thanks for the report, and sorry for the delay.

I'm not immediately sure, but we have had "strangeness" from the Digital Elevation Model we use as part of sen2cor. Could you read through https://github.com/microsoft/PlanetaryComputer/issues/291 and let me know whether that sounds like it might be the same issue?

trchudley commented 8 months ago

Thanks for the report, and sorry for the delay.

I'm not immediately sure, but we have had "strangeness" from the Digital Elevation Model we use as part of sen2cor. Could you read through #291 and let me know whether that sounds like it might be the same issue?

Thanks @TomAugspurger. I can't say for sure it is the exact same issue, although the fact that the 'striping' is broadly consistent between images does suggest to me that there is common underlying error and the DEM could be the issue. The first image in #291 reminds me very clearly of errors caused from nearest-neighbour resampling a larger DEM to a higher resolution (you can replicate this quickly using a hillshade in QGIS and messing with the resampling methods and zooming in and out). The shallower slopes of 'my' imagery make it a bit harder to resolve but there does appear to be the same jagged effects.

ghidalgo3 commented 2 weeks ago

Closed due to inactivity, feel free to reopen if you would like to continue this discussion.

trchudley commented 1 week ago

Thanks @ghidalgo3. Neither this nor #291 have, to my knowledge, been resolved, and it does seem to be problematic data artifact if present across the MPC Sentinel-2 dataset...

777arc commented 6 days ago

Thanks @ghidalgo3. Neither this nor #291 have, to my knowledge, been resolved, and it does seem to be problematic data artifact if present across the MPC Sentinel-2 dataset...

Thanks for replying, reopening Issue

trchudley commented 3 days ago

In an attempt to propose potential culprits for this problem, rasterio bilinear resampling appears to be introducing similar patterns of error as I see in the images I first posted (https://github.com/rasterio/rasterio/issues/2052#issuecomment-2078732477). I don't think Planetary Computer Sentinel-2 data has been been processed by rasterio prior to distribution but perhaps it's better than nothing for a starting lead!