eemont icon indicating copy to clipboard operation
eemont copied to clipboard

.preprocess() failed for the new COPERNICUS/S2_SR_HARMONIZED

Open Daniel-Trung-Nguyen opened this issue 1 year ago • 4 comments

Hi, GEE recently recommended switching to COPERNICUS/S2_HARMONIZED and COPERNICUS/S2_SR_HARMONIZED. I am not sure if the .preprocess() supports COPERNICUS/S2_SR_HARMONIZED natively, but I ran into errors running .preprocess() on the S2_SR_HARMONIZED image collection image

Thanks, Daniel

Daniel-Trung-Nguyen avatar May 08 '23 00:05 Daniel-Trung-Nguyen

Hi @Daniel-Trung-Nguyen, I just bumped onto the same issue. What I figured out so far is that the issue is coming from the underlying method .maskClouds() of the .preprocess() method.

Code below raises the same error than you showed except if one removes .maskClouds()

s2_prep_detailed = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED') \ .filterDate('2022-08-01', '2022-08-31') \ .filterBounds(ee.Geometry.Point([-74.0592,11.3172])) \ .scaleAndOffset() .maskClouds()

I though it was due to missing masks in some products (https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_S2_SR_HARMONIZED#bands), but this is also the case in the COPERNICUS/S2_SR products.

@davemlz, any idea where it could bug? Any advice also on applying the .scaleAndOffset() method on S2_SR_HARMONIZED dataset for which some range values have been shifted by 1000?

Thanks, Adrien

adguerou avatar Jul 21 '23 13:07 adguerou

any updates? I'm also experiencing this exact issue, would love to get some help

asaph-marvin avatar Jul 30 '23 13:07 asaph-marvin

Same issue here. My code using scaleAndOffset() and masClouds() works great for COPERNICUS/S2_SR but throws the error shown above when switching to COPERNICUS/S2_SR_HARMONIZED.

philament avatar Aug 25 '23 10:08 philament

Having the same issue. The issue lies with ee_extra. I've created a pull request to fix this issue.

lukegre avatar May 21 '24 09:05 lukegre