Skip to content

Improve efficiency of Google Earth Engine requests #24

Description

@2320sharon

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:

  1. Move cloud-cover and month filtering into Earth Engine before calling getInfo().

  2. Avoid calling collection.size().getInfo() before retrieving image metadata.

  3. Fix large-collection paging so it uses the already-filtered collection.

  4. Reuse band metadata from im_meta["bands"] instead of calling image_ee.getInfo() per scene.

  5. Cache adjusted download regions by ROI, CRS, and pixel grid to avoid repeated adjust_polygon(...).getInfo() calls.

  6. Join Sentinel-2 imagery with S2_CLOUD_PROBABILITY server-side instead of making a separate metadata request and matching locally.

  7. Bundle band downloads into fewer getDownloadId() requests where Earth Engine size limits allow.

  8. Expand the skip/download cache so repeated or overlapping runs do not re-query the same scenes.

  9. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions