From e251d05b534666621ed034d2b6a2d8c8bee40386 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 31 Mar 2023 10:28:46 +0200 Subject: [PATCH] Streamline GeoJSON import #346 (#412) * Streamline geojson import #346 * Fix typos * Deprecation * Remove load_geojson --- CHANGELOG.md | 9 ++++++++- aggregate_spatial.json | 13 +++++++----- filter_spatial.json | 12 +++++++---- load_collection.json | 5 +++-- mask_polygon.json | 13 +++++++----- meta/subtype-schemas.json | 3 ++- proposals/filter_vector.json | 27 +++++++++---------------- proposals/vector_buffer.json | 27 +++++++++---------------- proposals/vector_to_random_points.json | 25 +++++++++-------------- proposals/vector_to_regular_points.json | 25 +++++++++-------------- tests/.words | 1 + 11 files changed, 76 insertions(+), 84 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1f37b14..1a7ecbbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,13 +52,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `sort` and `order`: The ordering of ties is not defined anymore. [#409](https://github.com/Open-EO/openeo-processes/issues/409) - `quantiles`: Parameter `probabilities` provided as array must be in ascending order. [#297](https://github.com/Open-EO/openeo-processes/pull/297) +### Deprecated + +- `aggregate_spatial`, `filter_spatial`, `load_collection`, `mask_polygon`: GeoJSON input is deprecated. [#346](https://github.com/Open-EO/openeo-processes/issues/346) + ### Removed - The `examples` folder has been migrated to the [openEO Community Examples](https://github.com/Open-EO/openeo-community-examples/tree/main/processes) repository. - `between`: Support for temporal comparison. - Deprecated `GeometryCollections` are not supported any longer. [#389](https://github.com/Open-EO/openeo-processes/issues/389) - Deprecated PROJ definitions for the CRS are not supported any longer. -- `load_result`: Renamed to `load_stac` and the subtype `job-id` was removed in favor of providing a URL. [#322](https://github.com/Open-EO/openeo-processes/issues/322), [#377](https://github.com/Open-EO/openeo-processes/issues/377), [#384](https://github.com/Open-EO/openeo-processes/issues/384) +- `load_result`: + - Renamed to `load_stac` + - The subtype `job-id` was removed in favor of providing a URL. [#322](https://github.com/Open-EO/openeo-processes/issues/322), [#377](https://github.com/Open-EO/openeo-processes/issues/377), [#384](https://github.com/Open-EO/openeo-processes/issues/384) + - GeoJSON input is not supported any longer. [#346](https://github.com/Open-EO/openeo-processes/issues/346) - The comparison processes `eq`, `neq`, `lt`, `lte`, `gt`, `gte` and `array_contains`: - Removed support for temporal comparison. Instead explicitly use `date_difference`. - Removed support for the input data types array and object. [#208](https://github.com/Open-EO/openeo-processes/issues/208) diff --git a/aggregate_spatial.json b/aggregate_spatial.json index 880ad9a3..eb913949 100644 --- a/aggregate_spatial.json +++ b/aggregate_spatial.json @@ -29,11 +29,7 @@ "description": "Geometries for which the aggregation will be computed. Feature properties are preserved for vector data cubes and all GeoJSON Features.\n\nOne value will be computed per label in the dimension of type `geometries`, GeoJSON `Feature` or `Geometry`. For a `FeatureCollection` multiple values will be computed, one value per contained `Feature`. No values will be computed for empty geometries. 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. No operation is applied to geometries that are outside of the bounds of the data.", "schema": [ { - "type": "object", - "subtype": "geojson", - "description": "The GeoJSON type `GeometryCollection` is not supported." - }, - { + "title": "Vector Data Cube", "type": "object", "subtype": "datacube", "dimensions": [ @@ -41,6 +37,13 @@ "type": "geometry" } ] + }, + { + "title": "GeoJSON", + "type": "object", + "subtype": "geojson", + "description": "Deprecated. The GeoJSON type `GeometryCollection` is not supported.", + "deprecated": true } ] }, diff --git a/filter_spatial.json b/filter_spatial.json index 5a7a6c51..8f8120ce 100644 --- a/filter_spatial.json +++ b/filter_spatial.json @@ -29,10 +29,7 @@ "description": "One or more geometries used for filtering, given as GeoJSON or vector data cube. If multiple geometries are provided, the union of them is used. Empty geometries are ignored.\n\nLimits the data cube to the bounding box of the given geometries. No implicit masking gets applied. To mask the pixels of the data cube use ``mask_polygon()``.", "schema": [ { - "type": "object", - "subtype": "geojson" - }, - { + "title": "Vector Data Cube", "type": "object", "subtype": "datacube", "dimensions": [ @@ -40,6 +37,13 @@ "type": "geometry" } ] + }, + { + "title": "GeoJSON", + "type": "object", + "subtype": "geojson", + "description": "Deprecated. The GeoJSON type `GeometryCollection` is not supported.", + "deprecated": true } ] } diff --git a/load_collection.json b/load_collection.json index f5a8c8cf..06d4ac94 100644 --- a/load_collection.json +++ b/load_collection.json @@ -87,9 +87,10 @@ }, { "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`).\n\nThe GeoJSON type `GeometryCollection` is not supported. Empty geometries are ignored.", + "description": "Deprecated. 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. Empty geometries are ignored.", "type": "object", - "subtype": "geojson" + "subtype": "geojson", + "deprecated": true }, { "title": "Vector data cube", diff --git a/mask_polygon.json b/mask_polygon.json index d2f85a22..8d8e3cad 100644 --- a/mask_polygon.json +++ b/mask_polygon.json @@ -29,11 +29,7 @@ "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.\n* Empty geometries are ignored.", "schema": [ { - "type": "object", - "subtype": "geojson", - "description": "The GeoJSON type `GeometryCollection` is not supported." - }, - { + "title": "Vector Data Cube", "type": "object", "subtype": "datacube", "dimensions": [ @@ -45,6 +41,13 @@ ] } ] + }, + { + "title": "GeoJSON", + "type": "object", + "subtype": "geojson", + "description": "Deprecated. The GeoJSON type `GeometryCollection` is not supported.", + "deprecated": true } ] }, diff --git a/meta/subtype-schemas.json b/meta/subtype-schemas.json index ba37301c..dc527e08 100644 --- a/meta/subtype-schemas.json +++ b/meta/subtype-schemas.json @@ -166,7 +166,8 @@ "type": "object", "subtype": "geojson", "title": "GeoJSON", - "description": "GeoJSON as defined by [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946.html).", + "description": "Deprecated. GeoJSON as defined by [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946.html). The GeoJSON type `GeometryCollection` is not supported.", + "deprecated": true, "allOf": [ { "$ref": "https://geojson.org/schema/GeoJSON.json" diff --git a/proposals/filter_vector.json b/proposals/filter_vector.json index 90b2df20..4560848e 100644 --- a/proposals/filter_vector.json +++ b/proposals/filter_vector.json @@ -24,23 +24,16 @@ }, { "name": "geometries", - "description": "One or more base geometries used for filtering, given as GeoJSON or vector data cube. If multiple base geometries are provided, the union of them is used. Empty geometries are ignored.", - "schema": [ - { - "type": "object", - "subtype": "geojson", - "description": "The GeoJSON type `GeometryCollection` is not supported." - }, - { - "type": "object", - "subtype": "datacube", - "dimensions": [ - { - "type": "geometry" - } - ] - } - ] + "description": "One or more base geometries used for filtering, given as vector data cube. If multiple base geometries are provided, the union of them is used.", + "schema": { + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "geometry" + } + ] + } }, { "name": "relation", diff --git a/proposals/vector_buffer.json b/proposals/vector_buffer.json index aa709fbb..9c4f86ae 100644 --- a/proposals/vector_buffer.json +++ b/proposals/vector_buffer.json @@ -9,23 +9,16 @@ "parameters": [ { "name": "geometries", - "description": "Geometries to apply the buffer on. Feature properties are preserved for vector data cubes and all GeoJSON Features.", - "schema": [ - { - "type": "object", - "subtype": "geojson", - "description": "The GeoJSON type `GeometryCollection` is not supported." - }, - { - "type": "object", - "subtype": "datacube", - "dimensions": [ - { - "type": "geometry" - } - ] - } - ] + "description": "Geometries to apply the buffer on. Feature properties are preserved.", + "schema": { + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "geometry" + } + ] + } }, { "name": "distance", diff --git a/proposals/vector_to_random_points.json b/proposals/vector_to_random_points.json index 2ebb400f..b568b54c 100644 --- a/proposals/vector_to_random_points.json +++ b/proposals/vector_to_random_points.json @@ -11,22 +11,15 @@ { "name": "data", "description": "Input geometries for sample extraction.", - "schema": [ - { - "type": "object", - "subtype": "geojson", - "description": "The GeoJSON type `GeometryCollection` is not supported." - }, - { - "type": "object", - "subtype": "datacube", - "dimensions": [ - { - "type": "geometry" - } - ] - } - ] + "schema": { + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "geometry" + } + ] + } }, { "name": "geometry_count", diff --git a/proposals/vector_to_regular_points.json b/proposals/vector_to_regular_points.json index c2b01585..2f353bdb 100644 --- a/proposals/vector_to_regular_points.json +++ b/proposals/vector_to_regular_points.json @@ -11,22 +11,15 @@ { "name": "data", "description": "Input geometries for sample extraction.", - "schema": [ - { - "type": "object", - "subtype": "geojson", - "description": "The GeoJSON type `GeometryCollection` is not supported." - }, - { - "type": "object", - "subtype": "datacube", - "dimensions": [ - { - "type": "geometry" - } - ] - } - ] + "schema": { + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "geometry" + } + ] + } }, { "name": "distance", diff --git a/tests/.words b/tests/.words index a8a1d78a..c7f2a702 100644 --- a/tests/.words +++ b/tests/.words @@ -10,6 +10,7 @@ DEM-based Domini gamma0 GeoJSON +FeatureCollections labeled MathWorld n-ary