Skip to content

feat: add support for backend-specific parameters#858

Open
emmanuelmathot wants to merge 1 commit intoOpen-EO:masterfrom
emmanuelmathot:add-be-params
Open

feat: add support for backend-specific parameters#858
emmanuelmathot wants to merge 1 commit intoOpen-EO:masterfrom
emmanuelmathot:add-be-params

Conversation

@emmanuelmathot
Copy link

Summary

Adds **kwargs support to load_collection() to allow passing additional backend-specific parameters that are not part of the standard openEO specification.

Motivation

Different openEO backends may support additional parameters like nodata, target_crs, tile_buffer, etc. This change enables users to leverage these backend-specific features.

Example

cube = connection.load_collection(
    "sentinel-2-l2a",
    spatial_extent={"west": 10, "south": 45, "east": 11, "north": 46},
    temporal_extent=["2023-01-01", "2023-06-01"],
    bands=["B04", "B03", "B02"],
    nodata=0,           # backend-specific
    target_crs=32632,   # backend-specific
)

Changes

  • Added **kwargs to Connection.load_collection() and DataCube.load_collection()
  • Extra parameters are passed through to the process graph
  • Added tests and updated documentation

@soxofaan
Copy link
Member

soxofaan commented Mar 4, 2026

quick note: can you avoid unrelated code style tweaks in this PR, as it makes it near impossible to see what actually changed here

@soxofaan
Copy link
Member

soxofaan commented Mar 5, 2026

Also note, there is already a helper to append non-standard arguments
documented at https://open-eo.github.io/openeo-python-client/processes.html#advanced-argument-tweaking

# `Connection.load_collection` does not support `feature_flags` argument
cube = connection.load_collection(...)

# Add `feature_flag` argument `load_collection` process graph node
cube.result_node().update_arguments(feature_flags="rXPk")

note that this is a more general solution, not limited to load_collection nodes
and it more clearly flags which parts of your code are outside of the standard spec

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