From a64ce16d6a4489adddde073af0a7ec977f60fcc6 Mon Sep 17 00:00:00 2001 From: Elien Vandermaesen Date: Thu, 2 Jan 2025 09:02:39 +0100 Subject: [PATCH] issue #678 correct valid types of geojson types in filter_spatial --- openeo/rest/datacube.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/openeo/rest/datacube.py b/openeo/rest/datacube.py index 457b7e61c..2afcf46e7 100644 --- a/openeo/rest/datacube.py +++ b/openeo/rest/datacube.py @@ -647,7 +647,14 @@ def filter_spatial( (which will be loaded client-side to get the geometries as GeoJSON construct). """ valid_geojson_types = [ - "Polygon", "MultiPolygon", "GeometryCollection", "FeatureCollection" + "Point", + "MultiPoint", + "LineString", + "MultiLineString", + "Polygon", + "MultiPolygon", + "GeometryCollection", + "FeatureCollection", ] geometries = _get_geometry_argument(geometries, valid_geojson_types=valid_geojson_types, connection=self.connection, crs=None) return self.process( @@ -2809,6 +2816,8 @@ def unflatten_dimension(self, dimension: str, target_dimensions: List[str], labe label_separator=label_separator, ), ) + + def _get_geometry_argument( argument: Union[ shapely.geometry.base.BaseGeometry,