Skip to content

Commit

Permalink
Merge pull request #42 from eodcgmbh/vector-updates
Browse files Browse the repository at this point in the history
add new vector processes
  • Loading branch information
ValentinaHutter authored Nov 28, 2024
2 parents 45f52ab + 91b861d commit f0ecf98
Show file tree
Hide file tree
Showing 4 changed files with 201 additions and 148 deletions.
53 changes: 53 additions & 0 deletions load_geojson.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"id": "load_geojson",
"summary": "Converts GeoJSON into a vector data cube",
"description": "Converts 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": "A GeoJSON object to convert into a vector data cube. 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": "A list of properties from the GeoJSON file to construct an additional dimension from. A new dimension with the name `properties` and type `other` is created if at least one property is provided. 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.",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"default": [],
"optional": true
}
],
"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"
}
]
}
148 changes: 0 additions & 148 deletions missing-processes/resample_spatial.json

This file was deleted.

51 changes: 51 additions & 0 deletions vector_buffer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"id": "vector_buffer",
"summary": "Buffer geometries by distance",
"description": "Buffers each input geometry by a given distance, which can either expand (dilate) or a shrink (erode) the geometry. Buffers can be applied to points, lines and polygons, but the results are always polygons. Empty geometries are passed through and negative buffers may result in empty geometries. Multi-part types (e.g. `MultiPoint`) are also allowed.",
"categories": [
"vector"
],
"experimental": true,
"parameters": [
{
"name": "geometries",
"description": "Geometries to apply the buffer on. Feature properties are preserved.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry"
}
]
}
},
{
"name": "distance",
"description": "The distance of the buffer in meters. A positive distance expands the geometries, resulting in outward buffering (dilation), while a negative distance shrinks the geometries, resulting in inward buffering (erosion).\n\nIf the unit of the spatial reference system is not meters, a `UnitMismatch` error is thrown. Use ``vector_reproject()`` to convert the geometries to a suitable spatial reference system.",
"schema": {
"type": "number",
"not": {
"const": 0
}
}
}
],
"returns": {
"description": "Returns a vector data cube with the computed new geometries of which some may be empty.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry"
}
]
}
},
"exceptions": {
"UnitMismatch": {
"message": "The unit of the spatial reference system is not meters, but the given distance is in meters."
}
}
}
97 changes: 97 additions & 0 deletions vector_reproject.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"id": "vector_reproject",
"summary": "Reprojects the geometry dimension",
"description": "Converts the geometries stored in a geometry dimension to a different coordinate reference system.",
"categories": [
"cubes",
"reproject",
"vector"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "A vector data cube.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry"
}
]
}
},
{
"name": "projection",
"description": "Coordinate reference system to reproject to. Specified as an [EPSG code](http://www.epsg-registry.org/) or [WKT2 CRS string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html).",
"schema": [
{
"title": "EPSG Code",
"type": "integer",
"subtype": "epsg-code",
"minimum": 1000,
"examples": [
3857
]
},
{
"title": "WKT2",
"type": "string",
"subtype": "wkt2-definition"
}
]
},
{
"name": "dimension",
"description": "The name of the geometry dimension to reproject. If no specific dimension is specified, the filter applies to all geometry dimensions. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist.",
"schema": {
"type": [
"string",
"null"
]
},
"default": null,
"optional": true
}
],
"returns": {
"description": "A vector data cube with geometries projected to the new coordinate reference system. The reference system of the geometry dimension changes, all other dimensions and properties remain unchanged.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry"
}
]
}
},
"exceptions": {
"DimensionNotAvailable": {
"message": "A dimension with the specified name does not exist."
}
},
"links": [
{
"href": "https://openeo.org/documentation/1.0/datacubes.html#resample",
"rel": "about",
"title": "Resampling explained in the openEO documentation"
},
{
"rel": "about",
"href": "https://proj.org/usage/projections.html",
"title": "PROJ parameters for cartographic projections"
},
{
"rel": "about",
"href": "http://www.epsg-registry.org",
"title": "Official EPSG code registry"
},
{
"rel": "about",
"href": "http://www.epsg.io",
"title": "Unofficial EPSG code database"
}
]
}

0 comments on commit f0ecf98

Please sign in to comment.