r-earthengine / ee_extra

A ninja python package that unifies the Google Earth Engine ecosystem.
https://ee-extra.readthedocs.io/
Other
58 stars 10 forks source link

Fix cloud masking for COPERNICUS/S2_SR_HARMONIZED #54

Open lukegre opened 1 month ago

lukegre commented 1 month ago

Fix bug for S2_SR_HARMONIZED

Problem

ImageCollection COPERNICUS/S2_SR_HARMONIZED is not processed correctly, leading to problem in eemont when trying to use s2.maskClouds().

Fix

Hard comparison of platform (i.e., platform == "S3_SR") excludes S2_SR_HARMONIZED. Simply changed to a more lenient platform comparison (i.e., .startswith(S3_SR)).

Fixes the problem locally on my machine.

lukegre commented 1 month ago

Already addressed by #52 but I'll leave it here since my changes do not include clouds+ which the dev team might not want to include immediately.