Skip to content

Support raster cube input to run_udf via STAC catalog materialization#1680

Draft
EmileSonneveld with Copilot wants to merge 3 commits into
masterfrom
copilot/add-cwl-raster-cube-support
Draft

Support raster cube input to run_udf via STAC catalog materialization#1680
EmileSonneveld with Copilot wants to merge 3 commits into
masterfrom
copilot/add-cwl-raster-cube-support

Conversation

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
Contributor

When a save_result node feeds into run_udf, the datacube needs to be materialized to disk and passed as a STAC catalog URL. Previously, run_udf couldn't accept a DriverDataCube as input.

Changes

  • GeopysparkDataCube now implements SupportsRunUdf — the ProcessGraphDeserializer.run_udf() detects this interface and dispatches directly to the cube's run_udf method
  • run_udf() materializes the cube to a STAC catalog — calls write_assets() to produce GeoTIFFs, then writes a STAC 1.0.0 catalog linking the items, and passes the catalog URL as structured data to the UDF
  • _write_stac_catalog() helper — writes valid STAC catalog + item JSON files from write_assets output

UDF receives the catalog URL like this:

from openeo.udf import UdfData, StructuredData

def udf_function(data: UdfData):
    stac_url = data.get_structured_data_list()[0].data["stac_catalog_url"]
    # Process STAC catalog (e.g., invoke CWL workflow)
    return UdfData(structured_data_list=[StructuredData(data=result, type="dict")])

Copilot AI linked an issue May 26, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits May 26, 2026 08:46
…C catalog

Implement SupportsRunUdf interface on GeopysparkDataCube so that a
save_result process graph node output can be passed to run_udf.
The datacube is materialized to disk as a STAC catalog and the root
catalog URL is passed as structured data to the UDF.

Agent-Logs-Url: https://github.com/Open-EO/openeo-geopyspark-driver/sessions/5ba19e23-5555-4cbb-84fe-1b4906c165fd

Co-authored-by: EmileSonneveld <2298426+EmileSonneveld@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for CWL using raster cube input Support raster cube input to run_udf via STAC catalog materialization May 26, 2026
Copilot AI requested a review from EmileSonneveld May 26, 2026 08:59
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.

CWL: raster cube input

2 participants