From 2a1e65b5c0663dcc972955d9bc49f3fa7c8056a0 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 28 Nov 2022 16:16:11 +0100 Subject: [PATCH] Deprecated `GeometryCollections` are not supported any longer. #389 --- CHANGELOG.md | 1 + aggregate_spatial.json | 5 +++-- load_collection.json | 4 ++-- mask_polygon.json | 8 ++++---- proposals/filter_vector.json | 5 +++-- proposals/load_result.json | 4 ++-- proposals/vector_buffer.json | 5 +++-- proposals/vector_to_random_points.json | 5 +++-- proposals/vector_to_regular_points.json | 5 +++-- tests/testHelpers.js | 2 +- 10 files changed, 25 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd93c5c7..5f77bc11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - The `examples` folder has been migrated to the [openEO Community Examples](https://github.com/Open-EO/openeo-community-examples/tree/main/processes) repository. +- Deprecated `GeometryCollections` are not supported any longer. [#389](https://github.com/Open-EO/openeo-processes/issues/389) ### Fixed diff --git a/aggregate_spatial.json b/aggregate_spatial.json index 1842649d..d7e9e2e0 100644 --- a/aggregate_spatial.json +++ b/aggregate_spatial.json @@ -26,11 +26,12 @@ }, { "name": "geometries", - "description": "Geometries for which the aggregation will be computed. Vector properties are preserved for vector data cubes and all GeoJSON Features.\n\nOne value will be computed per label in the dimension of type `vector`, GeoJSON `Feature`, `Geometry` or `GeometryCollection`. For a `FeatureCollection` multiple values will be computed, one value per contained `Feature`. For example, a single value will be computed for a `MultiPolygon`, but two values will be computed for a `FeatureCollection` containing two polygons.\n\n- For **polygons**, the process considers all pixels for which the point at the pixel center intersects with the corresponding polygon (as defined in the Simple Features standard by the OGC).\n- For **points**, the process considers the closest pixel center.\n- For **lines** (line strings), the process considers all the pixels whose centers are closest to at least one point on the line.\n\nThus, pixels may be part of multiple geometries and be part of multiple aggregations.\n\nTo maximize interoperability, a nested `GeometryCollection` should be avoided. Furthermore, a `GeometryCollection` composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. `MultiPolygon`).", + "description": "Geometries for which the aggregation will be computed. Vector properties are preserved for vector data cubes and all GeoJSON Features.\n\nOne value will be computed per label in the dimension of type `vector`, GeoJSON `Feature` or GeoJSON `Geometry`. For a `FeatureCollection` multiple values will be computed, one value per contained `Feature`. For example, a single value will be computed for a `MultiPolygon`, but two values will be computed for a `FeatureCollection` containing two polygons.\n\n- For **polygons**, the process considers all pixels for which the point at the pixel center intersects with the corresponding polygon (as defined in the Simple Features standard by the OGC).\n- For **points**, the process considers the closest pixel center.\n- For **lines** (line strings), the process considers all the pixels whose centers are closest to at least one point on the line.\n\nThus, pixels may be part of multiple geometries and be part of multiple aggregations.", "schema": [ { "type": "object", - "subtype": "geojson" + "subtype": "geojson", + "description": "The GeoJSON type `GeometryCollection` is not supported." }, { "type": "object", diff --git a/load_collection.json b/load_collection.json index 3759ab56..bcf02132 100644 --- a/load_collection.json +++ b/load_collection.json @@ -18,7 +18,7 @@ }, { "name": "spatial_extent", - "description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\n* For raster data, the process loads the pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n* For vector data, the process loads the geometry into the data cube if the geometry is fully *within* the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n\nThe GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry,\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries, or\n* a `GeometryCollection` containing `Polygon` or `MultiPolygon` geometries. To maximize interoperability, `GeometryCollection` should be avoided in favour of one of the alternatives above.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", + "description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\n* For raster data, the process loads the pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n* For vector data, the process loads the geometry into the data cube if the geometry is fully *within* the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n\nThe GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry, or\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", "schema": [ { "title": "Bounding Box", @@ -93,7 +93,7 @@ }, { "title": "GeoJSON", - "description": "Limits the data cube to the bounding box of the given geometries. For raster data, all pixels inside the bounding box that do not intersect with any of the polygons will be set to no data (`null`).", + "description": "Limits the data cube to the bounding box of the given geometries. For raster data, all pixels inside the bounding box that do not intersect with any of the polygons will be set to no data (`null`).\n\nThe GeoJSON type `GeometryCollection` is not supported.", "type": "object", "subtype": "geojson" }, diff --git a/mask_polygon.json b/mask_polygon.json index c46d17af..299d9737 100644 --- a/mask_polygon.json +++ b/mask_polygon.json @@ -26,11 +26,12 @@ }, { "name": "mask", - "description": "A GeoJSON object or a vector data cube containing at least one polygon. The provided vector data can be one of the following:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry,\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries, or\n* a `GeometryCollection` containing `Polygon` or `MultiPolygon` geometries. To maximize interoperability, `GeometryCollection` should be avoided in favour of one of the alternatives above.", + "description": "A GeoJSON object or a vector data cube containing at least one polygon. The provided vector data can be one of the following:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry, or\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries.", "schema": [ { "type": "object", - "subtype": "geojson" + "subtype": "geojson", + "description": "The GeoJSON type `GeometryCollection` is not supported." }, { "type": "object", @@ -40,8 +41,7 @@ "type": "vector", "geometry_type": [ "Polygon", - "MultiPolygon", - "GeometryCollection" + "MultiPolygon" ] } ] diff --git a/proposals/filter_vector.json b/proposals/filter_vector.json index e04bf9e3..1609cda7 100644 --- a/proposals/filter_vector.json +++ b/proposals/filter_vector.json @@ -24,11 +24,12 @@ }, { "name": "geometries", - "description": "One or more base geometries used for filtering, given as GeoJSON or vector data cube.\n\nTo maximize interoperability, `GeometryCollection` and multi geometries (e.g. `MultiPolygon`) should be be avoided.", + "description": "One or more base geometries used for filtering, given as GeoJSON or vector data cube.", "schema": [ { "type": "object", - "subtype": "geojson" + "subtype": "geojson", + "description": "The GeoJSON type `GeometryCollection` is not supported." }, { "type": "object", diff --git a/proposals/load_result.json b/proposals/load_result.json index 7906fd29..7cbcaa2d 100644 --- a/proposals/load_result.json +++ b/proposals/load_result.json @@ -29,7 +29,7 @@ }, { "name": "spatial_extent", - "description": "Limits the data to load from the batch job result to the specified bounding box or polygons.\n\n* For raster data, the process loads the pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n* For vector data, the process loads the geometry into the data cube of the geometry is fully within the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n\nThe GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry,\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries, or\n* a `GeometryCollection` containing `Polygon` or `MultiPolygon` geometries. To maximize interoperability, `GeometryCollection` should be avoided in favour of one of the alternatives above.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", + "description": "Limits the data to load from the batch job result to the specified bounding box or polygons.\n\n* For raster data, the process loads the pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n* For vector data, the process loads the geometry into the data cube of the geometry is fully within the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n\nThe GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry, or\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", "schema": [ { "title": "Bounding Box", @@ -104,7 +104,7 @@ }, { "title": "GeoJSON", - "description": "Limits the data cube to the bounding box of the given geometry. All pixels inside the bounding box that do not intersect with any of the polygons will be set to no data (`null`).", + "description": "Limits the data cube to the bounding box of the given geometries. For raster data, all pixels inside the bounding box that do not intersect with any of the polygons will be set to no data (`null`).\n\nThe GeoJSON type `GeometryCollection` is not supported.", "type": "object", "subtype": "geojson" }, diff --git a/proposals/vector_buffer.json b/proposals/vector_buffer.json index 9ee12fa6..99ee8ba4 100644 --- a/proposals/vector_buffer.json +++ b/proposals/vector_buffer.json @@ -9,11 +9,12 @@ "parameters": [ { "name": "geometries", - "description": "Geometries to apply the buffer on. Vector properties are preserved for vector data cubes and all GeoJSON Features.\n\nTo maximize interoperability, a nested `GeometryCollection` should be avoided. Furthermore, a `GeometryCollection` composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. `MultiPolygon`).", + "description": "Geometries to apply the buffer on. Vector properties are preserved for vector data cubes and all GeoJSON Features.", "schema": [ { "type": "object", - "subtype": "geojson" + "subtype": "geojson", + "description": "The GeoJSON type `GeometryCollection` is not supported." }, { "type": "object", diff --git a/proposals/vector_to_random_points.json b/proposals/vector_to_random_points.json index 600ed547..c45c6280 100644 --- a/proposals/vector_to_random_points.json +++ b/proposals/vector_to_random_points.json @@ -10,11 +10,12 @@ "parameters": [ { "name": "data", - "description": "Input geometries for sample extraction.\n\nTo maximize interoperability, a nested `GeometryCollection` should be avoided. Furthermore, a `GeometryCollection` composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. `MultiPolygon`).", + "description": "Input geometries for sample extraction.", "schema": [ { "type": "object", - "subtype": "geojson" + "subtype": "geojson", + "description": "The GeoJSON type `GeometryCollection` is not supported." }, { "type": "object", diff --git a/proposals/vector_to_regular_points.json b/proposals/vector_to_regular_points.json index 20b44d9a..6a7c8e71 100644 --- a/proposals/vector_to_regular_points.json +++ b/proposals/vector_to_regular_points.json @@ -10,11 +10,12 @@ "parameters": [ { "name": "data", - "description": "Input geometries for sample extraction.\n\nTo maximize interoperability, a nested `GeometryCollection` should be avoided. Furthermore, a `GeometryCollection` composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. `MultiPolygon`).", + "description": "Input geometries for sample extraction.", "schema": [ { "type": "object", - "subtype": "geojson" + "subtype": "geojson", + "description": "The GeoJSON type `GeometryCollection` is not supported." }, { "type": "object", diff --git a/tests/testHelpers.js b/tests/testHelpers.js index 4d7a224f..4340d5cb 100644 --- a/tests/testHelpers.js +++ b/tests/testHelpers.js @@ -154,7 +154,7 @@ async function getAjv() { minItems: 1, items: { type: "string", - enum: ["Point", "LineString", "Polygon", "MultiPoint", "MultiLineString", "MultiPolygon", "GeometryCollection"] + enum: ["Point", "LineString", "Polygon", "MultiPoint", "MultiLineString", "MultiPolygon"] } } }