Skip to content

Commit

Permalink
Add load_geojson #346 #415
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Mar 31, 2023
1 parent 19d6f02 commit f303ee3
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 7 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `date_difference`
- `filter_vector`
- `flatten_dimensions`
- `load_geojson`
- `unflatten_dimension`
- `vector_buffer`
- `vector_reproject`
Expand Down Expand Up @@ -54,7 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

- `aggregate_spatial`, `filter_spatial`, `load_collection`, `mask_polygon`: GeoJSON input is deprecated. [#346](https://github.com/Open-EO/openeo-processes/issues/346)
- `aggregate_spatial`, `filter_spatial`, `load_collection`, `mask_polygon`: GeoJSON input is deprecated in favor of `load_geojson`. [#346](https://github.com/Open-EO/openeo-processes/issues/346)

### Removed

Expand All @@ -65,7 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `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)
- GeoJSON input is not supported any longer. Use `load_geojson` instead. [#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)
Expand Down
2 changes: 1 addition & 1 deletion aggregate_spatial.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"title": "GeoJSON",
"type": "object",
"subtype": "geojson",
"description": "Deprecated. The GeoJSON type `GeometryCollection` is not supported.",
"description": "Deprecated in favor of ``load_geojson()``. The GeoJSON type `GeometryCollection` is not supported.",
"deprecated": true
}
]
Expand Down
2 changes: 1 addition & 1 deletion filter_spatial.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"title": "GeoJSON",
"type": "object",
"subtype": "geojson",
"description": "Deprecated. The GeoJSON type `GeometryCollection` is not supported.",
"description": "Deprecated in favor of ``load_geojson()``. The GeoJSON type `GeometryCollection` is not supported.",
"deprecated": true
}
]
Expand Down
2 changes: 1 addition & 1 deletion load_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
{
"title": "GeoJSON",
"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.",
"description": "Deprecated in favor of ``load_geojson()``. 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",
"deprecated": true
Expand Down
2 changes: 1 addition & 1 deletion mask_polygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"title": "GeoJSON",
"type": "object",
"subtype": "geojson",
"description": "Deprecated. The GeoJSON type `GeometryCollection` is not supported.",
"description": "Deprecated in favor of ``load_geojson()``. The GeoJSON type `GeometryCollection` is not supported.",
"deprecated": true
}
]
Expand Down
2 changes: 1 addition & 1 deletion meta/subtype-schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"type": "object",
"subtype": "geojson",
"title": "GeoJSON",
"description": "Deprecated. GeoJSON as defined by [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946.html). The GeoJSON type `GeometryCollection` is not supported.",
"description": "GeoJSON as defined by [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946.html). The GeoJSON type `GeometryCollection` is not supported.",
"deprecated": true,
"allOf": [
{
Expand Down
51 changes: 51 additions & 0 deletions proposals/load_geojson.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"id": "load_geojson",
"summary": "Load GeoJSON data",
"description": "Loads GeoJSON data as defined by [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946.html) into a vector data cube. Feature properties are preserved.",
"categories": [
"import",
"vector"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "The GeoJSON data. Can either be inline GeoJSON, a user-uploaded file, or point to a remote URL. The GeoJSON type `GeometryCollection` is not supported. Each geometry in the GeoJSON data results in a dimension label in the `geometries` dimension.",
"schema": {
"type": "object",
"subtype": "geojson"
}
},
{
"name": "properties",
"description": "One or more properties from the GeoJSON file to construct an additional dimension from. Only applies for GeoJSON Features and FeatureCollections. Missing values are generally set to no-data (`null`).\n\nDepending on the number of properties provided, the process creates the dimension differently:\n\n- Single property with scalar values: A single dimension label with the name of the property and a single value per geometry.\n- Single property of type array: The dimension labels correspond to the array indices. There are as many values and labels per geometry as there are for the largest array.\n- Multiple properties with scalar values: The dimension labels correspond to the property names. There are as many values and labels per geometry as there are properties provided here.\n\nDepending on the number of properties the dimension name is:\n\n- Single property: Name of the property\n- Multiple properties: `properties`.",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
],
"returns": {
"description": "A vector data cube containing the geometries, either one or two dimensional.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry"
}
]
}
},
"links": [
{
"href": "https://www.rfc-editor.org/rfc/rfc7946.html",
"title": "RFC 7946: The GeoJSON Format",
"type": "text/html",
"rel": "about"
}
]
}

0 comments on commit f303ee3

Please sign in to comment.