Skip to content

Commit

Permalink
Issue #276 return DryRunDataCube in aggregate_spatial
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenVerstraelen committed Mar 21, 2024
1 parent 39dfaa4 commit 652226b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions openeo_driver/dry_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,7 @@ def aggregate_spatial(
geometries, bbox = self._normalize_geometry(geometries)
cube = self.filter_bbox(**bbox, operation="_weak_spatial_extent")
cube._process(operation="aggregate_spatial", arguments={"geometries": geometries})
if isinstance(geometries, (Polygon, MultiPolygon)):
# TODO #71 normalize to feature collection instead of deprecated geometry collection
geometries = GeometryCollection([geometries])
return AggregatePolygonResult(timeseries={}, regions=geometries)
return cube

def _normalize_geometry(self, geometries) -> Tuple[Union[DriverVectorCube, DelayedVector, BaseGeometry], dict]:
"""
Expand Down

0 comments on commit 652226b

Please sign in to comment.