Skip to content
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

Connection-less data cube creation #638

Closed
soxofaan opened this issue Oct 2, 2024 · 0 comments · Fixed by #639
Closed

Connection-less data cube creation #638

soxofaan opened this issue Oct 2, 2024 · 0 comments · Fixed by #639
Assignees

Comments

@soxofaan
Copy link
Member

soxofaan commented Oct 2, 2024

Coincidentally I got two requests this week how to start with a datacube (from load_collection or load_stac) without an actual connection.

DataCube has a load_collection factory to make that possible

import openeo

cube = openeo.DataCube.load_collection(
    "FOO_S2",
    temporal_extent=["2024-09-01", "2024-10-01"],
    # ...
    fetch_metadata=False,
)

Unfortunately this currently requires that fetch_metadata=False, which should not be necessary.

For load_stac it's a bit uglier at the moment:

import openeo.rest.datacube

arguments = {
    # ...
}

cube = openeo.rest.datacube.DataCube(
    openeo.rest.datacube.PGNode("load_stac", arguments=arguments),
    connection=None,
)

given the importance of load_stac, we should add a factory for that one too

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 a pull request may close this issue.

2 participants