The current download pipeline makes more Google Earth Engine requests than necessary. This issue tracks improvements to reduce redundant getInfo(), metadata, geometry, and download requests.
Key improvements:
-
Move cloud-cover and month filtering into Earth Engine before calling getInfo().
-
Avoid calling collection.size().getInfo() before retrieving image metadata.
-
Fix large-collection paging so it uses the already-filtered collection.
-
Reuse band metadata from im_meta["bands"] instead of calling image_ee.getInfo() per scene.
-
Cache adjusted download regions by ROI, CRS, and pixel grid to avoid repeated adjust_polygon(...).getInfo() calls.
-
Join Sentinel-2 imagery with S2_CLOUD_PROBABILITY server-side instead of making a separate metadata request and matching locally.
-
Bundle band downloads into fewer getDownloadId() requests where Earth Engine size limits allow.
-
Expand the skip/download cache so repeated or overlapping runs do not re-query the same scenes.
-
Add request-count logging around getInfo(), getDownloadId(), and download URL requests to measure improvements.
Goal:
Reduce unnecessary Earth Engine API calls, lower compute usage, and make repeated CoastSat runs more efficient without changing shoreline extraction results.
The current download pipeline makes more Google Earth Engine requests than necessary. This issue tracks improvements to reduce redundant
getInfo(), metadata, geometry, and download requests.Key improvements:
Move cloud-cover and month filtering into Earth Engine before calling
getInfo().Avoid calling
collection.size().getInfo()before retrieving image metadata.Fix large-collection paging so it uses the already-filtered collection.
Reuse band metadata from
im_meta["bands"]instead of callingimage_ee.getInfo()per scene.Cache adjusted download regions by ROI, CRS, and pixel grid to avoid repeated
adjust_polygon(...).getInfo()calls.Join Sentinel-2 imagery with
S2_CLOUD_PROBABILITYserver-side instead of making a separate metadata request and matching locally.Bundle band downloads into fewer
getDownloadId()requests where Earth Engine size limits allow.Expand the skip/download cache so repeated or overlapping runs do not re-query the same scenes.
Add request-count logging around
getInfo(),getDownloadId(), and download URL requests to measure improvements.Goal:
Reduce unnecessary Earth Engine API calls, lower compute usage, and make repeated CoastSat runs more efficient without changing shoreline extraction results.