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

getCol with maxCloudCover set to 0 returns images with CLOUD_COVER greater than 0 #1

Open
boothmanrylan opened this issue Nov 4, 2021 · 0 comments

Comments

@boothmanrylan
Copy link

Reproducible example: https://code.earthengine.google.com/0060c69c481eb30ecce9d51c1c23580d

I think the issue comes from here, where because 0 evaluates as false it gets replaced by the default parameter of 50:

msslib/msslib.js

Lines 374 to 379 in e1e59cf

// Replace default params with provided params.
if (params) {
for (var param in params) {
_params[param] = params[param] || _params[param];
}
}

Checking if the provided params are null or undefined has all the same behaviour as the current method, but allows maxCloudCover to be set to 0. For example:

// Replace default params with provided params.
  if (params) {
    for (var param in params) {
      if (params[param] != null) {
        _params[param] = params[param];
      }
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant