diff --git a/openeo_driver/ProcessGraphDeserializer.py b/openeo_driver/ProcessGraphDeserializer.py index c81dfcc4..8d196342 100644 --- a/openeo_driver/ProcessGraphDeserializer.py +++ b/openeo_driver/ProcessGraphDeserializer.py @@ -1052,24 +1052,8 @@ def aggregate_spatial(args: dict, env: EvalEnv) -> DriverDataCube: geoms = geoms elif isinstance(geoms, dict): try: - if ( - # Don't convert point geometries to DriverVectorCube - # TODO #114 migrate Point handling to DriverVectorCube too - geoms["type"] == "Point" - or (geoms["type"] == "Feature" and geoms["geometry"]["type"] == "Point") - or ( - geoms["type"] == "FeatureCollection" - and any(f["geometry"]["type"] == "Point" for f in geoms["features"]) - ) - or ( - geoms["type"] == "GeometryCollection" - and any(g["type"] == "Point" for g in geoms["geometries"]) - ) - ): - geoms = geojson_to_geometry(geoms) - else: - # Automatically convert inline GeoJSON to a vector cube #114/#141 - geoms = env.backend_implementation.vector_cube_cls.from_geojson(geoms) + # Automatically convert inline GeoJSON to a vector cube #114/#141 + geoms = env.backend_implementation.vector_cube_cls.from_geojson(geoms) except Exception as e: _log.error( f"Failed to parse inline GeoJSON geometries in aggregate_spatial: {e!r}", diff --git a/openeo_driver/_version.py b/openeo_driver/_version.py index cfa63f38..7e683584 100644 --- a/openeo_driver/_version.py +++ b/openeo_driver/_version.py @@ -1 +1 @@ -__version__ = "0.21.5a1" +__version__ = "0.21.6a1" diff --git a/openeo_driver/dry_run.py b/openeo_driver/dry_run.py index bd9e7b6c..9883fbb8 100644 --- a/openeo_driver/dry_run.py +++ b/openeo_driver/dry_run.py @@ -463,6 +463,7 @@ def aggregate_spatial( 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)