From c3270d15ac1d71774f79b21395a0aca7cd848239 Mon Sep 17 00:00:00 2001 From: dsamaey Date: Thu, 12 Feb 2026 16:25:31 +0100 Subject: [PATCH 1/3] fix: fixed aggregate_spatial_window arguments --- openeo_driver/ProcessGraphDeserializer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openeo_driver/ProcessGraphDeserializer.py b/openeo_driver/ProcessGraphDeserializer.py index e7b8289b..5ed6ad77 100644 --- a/openeo_driver/ProcessGraphDeserializer.py +++ b/openeo_driver/ProcessGraphDeserializer.py @@ -1518,9 +1518,9 @@ def aggregate_spatial_window(args: ProcessArgs, env: EvalEnv) -> DriverDataCube: reduce_pg = args.get_deep("reducer", "process_graph", expected_type=dict) window_size = args.get_required("size") align = args.get_optional("align", default="upper-left") - pad = args.get_optional("pad", default="pad") + boundary = args.get_optional("boundary", default="pad") context = args.get_optional("context", default=None) - return cube.aggregate_spatial_window(reducer=reduce_pg, size=window_size, align=align, pad=pad, context=context) + return cube.aggregate_spatial_window(reducer=reduce_pg, size=window_size, align=align, boundary=boundary, context=context) @process def mask(args: ProcessArgs, env: EvalEnv) -> DriverDataCube: From c7148759ce27e5a5194948882072db76a54c6d88 Mon Sep 17 00:00:00 2001 From: dsamaey Date: Thu, 12 Feb 2026 16:42:00 +0100 Subject: [PATCH 2/3] fix: add aggregate_spatial_window signature --- openeo_driver/datacube.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openeo_driver/datacube.py b/openeo_driver/datacube.py index bda2cda4..ae94dd5d 100644 --- a/openeo_driver/datacube.py +++ b/openeo_driver/datacube.py @@ -202,6 +202,15 @@ def aggregate_spatial( # TODO: drop `target_dimension`? see https://github.com/Open-EO/openeo-processes/issues/366 self._not_implemented() + def aggregate_spatial_window( + self, + size, + reducer: dict, + align: str="upper-left", + boundary: str = "pad" + ) -> "DriverDataCube": + self._not_implemented() + def ndvi(self, nir: str = "nir", red: str = "red", target_band: Optional[str] = None) -> "DriverDataCube": self._not_implemented() From eac465a35894ac1179f2a2a04f1678aa051ba276 Mon Sep 17 00:00:00 2001 From: dsamaey Date: Thu, 12 Feb 2026 17:39:06 +0100 Subject: [PATCH 3/3] fix: add aggregate_spatial_window to dry_run.py --- openeo_driver/dry_run.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openeo_driver/dry_run.py b/openeo_driver/dry_run.py index 44744611..0060f86c 100644 --- a/openeo_driver/dry_run.py +++ b/openeo_driver/dry_run.py @@ -654,6 +654,17 @@ def aggregate_spatial( cube = self.filter_bbox(**bbox, operation="weak_spatial_extent") return cube._process(operation="aggregate_spatial", arguments={"geometries": geometries}) + def aggregate_spatial_window( + self, + size, + reducer: dict, + align: str="upper-left", + boundary: str = "pad" + ) -> "DriverDataCube": + cube = self + return cube._process(operation="aggregate_spatial_window", arguments={"size": size, "reducer": reducer, "align": align, "boundary": boundary}) + + def _normalize_geometry( self, geometries, target_crs=None, target_resolution = None ) -> Tuple[Union[DriverVectorCube, DelayedVector, BaseGeometry], dict]: