Skip to content

implement lazy rasterstack #62

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

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

implement lazy rasterstack #62

wants to merge 35 commits into from

Conversation

emmanuelmathot
Copy link
Collaborator

@emmanuelmathot emmanuelmathot commented Mar 13, 2025

To address #57, this PR adds a new class LazyRasterStack implementing RasterStack that will read the data only when the imagedata in the dictionary is accessed. This way, the graph can easily support load_collection and an independent reducer without using load_collection_and_reduce systematically. This should also fix the issue of being aligned with datacube object type in #59. Finally, a good workload and output estimation must be implemented (complete #58) to ensure the graph is not impossible to process synchronously.

I tested sucessfully with some simple graph

@emmanuelmathot
Copy link
Collaborator Author

@vincentsarago please let me know what you think.

@emmanuelmathot
Copy link
Collaborator Author

@vincentsarago I simplify by enforcing rasterstack as data parameter only

@emmanuelmathot emmanuelmathot requested a review from Copilot April 4, 2025 06:00
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 23 out of 28 changed files in this pull request and generated 1 comment.

Files not reviewed (5)
  • services/earthsearch.json: Language not supported
  • titiler/openeo/processes/data/aggregate_spatial.json: Language not supported
  • titiler/openeo/processes/data/load_stac.json: Language not supported
  • titiler/openeo/processes/data/reduce_dimension.json: Language not supported
  • titiler/openeo/processes/data/resample_spatial.json: Language not supported

@emmanuelmathot emmanuelmathot marked this pull request as ready for review April 14, 2025 22:05
- Updated the Copernicus service configuration to include temporal extent in the process graph.
- Modified the response handling in the EndpointsFactory to return image data directly.
- Introduced new mathematical functions `first` and `last` to retrieve the first and last elements of an array, respectively.
- Improved the temporal dimension reduction logic to return a RasterStack instead of ImageData.
- Enhanced the LoadCollection class to validate input bands and extract resolution information more robustly.
- Added JSON definitions for the new `first` and `last` processes, including examples and descriptions.
…ve STAC API reader with dimension estimation and error handling
emmanuelmathot and others added 8 commits April 17, 2025 15:24
… redundant 'properties.' prefix in argument definitions
…ve 'properties.' prefix in test cases and enhance pixel limit checks
Co-authored-by: Vincent Sarago <vincent.sarago@gmail.com>
…ndex and label; improve readability in LoadCollection class by formatting asset selection
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

Successfully merging this pull request may close these issues.

2 participants