Skip to content

Commit

Permalink
issue #678 correct valid types of geojson types in filter_spatial
Browse files Browse the repository at this point in the history
  • Loading branch information
ElienVandermaesenVITO committed Jan 2, 2025
1 parent 81431c2 commit a64ce16
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion openeo/rest/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a64ce16

Please sign in to comment.