Skip to content

Commit

Permalink
Update gee_processing.py
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddkovacs authored Dec 21, 2024
1 parent 76b42aa commit d9b541b
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions pyeogpr/gee_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,24 +340,23 @@ def maploop(self):
lakemask = lakes.eq(0)
image_export = image_export.mask(lakemask)
image_export = image_export.mask(bare_cover)

# Convert to uint8 for lower memory usage
# image_export = image_export.multiply(255 / data_range).uint8()

# SHP-bbox misery
region = None
if type(self.bbox) is list:
region=self.bbox
image_export = image_export.clip(region)
elif isinstance(self.bbox, ee.FeatureCollection):
region = self.bbox.geometry()
image_export = image_export.clip(region)

image_export = image_export.set(
"system:time_start",
ee.Date(self.temporal_extent[0])
.advance(ee.Number(i).multiply(self.timeWindows), "days")
.millis(),
)

# SHP-bbox misery
region = None
if type(self.bbox) is list:
region=self.bbox
elif isinstance(self.bbox, ee.FeatureCollection):
region = self.bbox.geometry()

image_export = image_export.clip(region)
# Export the image to an asset
exportar = ee.batch.Export.image.toAsset(
assetId=self.assetpath
Expand Down

0 comments on commit d9b541b

Please sign in to comment.