Skip to content

Commit b4ff95a

Browse files
jdriesPeter Van Bouwel
authored andcommitted
flag issue with target_dimension in dry_run, to also trigger an error during validation
Open-EO/openeo-geopyspark-driver#951
1 parent 1786b13 commit b4ff95a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

openeo_driver/dry_run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
from openeo_driver.datacube import DriverDataCube, DriverVectorCube
5050
from openeo_driver.datastructs import SarBackscatterArgs, ResolutionMergeArgs
5151
from openeo_driver.delayed_vector import DelayedVector
52-
from openeo_driver.errors import OpenEOApiException
52+
from openeo_driver.errors import OpenEOApiException, FeatureUnsupportedException
5353
from openeo_driver.save_result import (
5454
AggregatePolygonResult,
5555
AggregatePolygonSpatialResult,
@@ -571,6 +571,8 @@ def aggregate_spatial(
571571
reducer: dict,
572572
target_dimension: Optional[str] = None,
573573
) -> "DryRunDataCube":
574+
if target_dimension:
575+
raise FeatureUnsupportedException(f"Argument `target_dimension` with value {target_dimension} not supported in `aggregate_spatial`")
574576
# TODO #71 #114 EP-3981 normalize to vector cube instead of GeometryCollection
575577
geoms_is_empty = isinstance(geometries, DriverVectorCube) and len(geometries.get_geometries()) == 0
576578
cube = self

0 commit comments

Comments
 (0)