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

.preprocess() failed for the new COPERNICUS/S2_SR_HARMONIZED #82

Open
Daniel-Trung-Nguyen opened this issue May 8, 2023 · 4 comments
Open
Labels
bug Something isn't working

Comments

@Daniel-Trung-Nguyen
Copy link

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 Daniel-Trung-Nguyen added the bug Something isn't working label May 8, 2023
@adguerou
Copy link

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

@asaph-marvin
Copy link

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

@philament
Copy link

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.

@lukegre
Copy link

lukegre commented May 21, 2024

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

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

5 participants