Skip to content

Commit

Permalink
Fix unmasking issue in download_ee_image function (#1977)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbferreira authored Apr 18, 2024
1 parent 215048e commit 128f2c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geemap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12894,11 +12894,11 @@ def download_ee_image(
raise ValueError("image must be an ee.Image.")

if unmask_value is not None:
image = image.selfMask().unmask(unmask_value)
if isinstance(region, ee.Geometry):
image = image.clip(region)
elif isinstance(region, ee.FeatureCollection):
image = image.clipToCollection(region)
image = image.unmask(unmask_value, sameFootprint=False)

if region is not None:
kwargs["region"] = region
Expand Down

0 comments on commit 128f2c3

Please sign in to comment.