Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vector_buffer #314

Merged
merged 7 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased / Draft

### Added

- New processes in proposal state
- `vector_buffer`

### Changed

- Added better support for labeled arrays. Labels are not discarded in all cases anymore. Affected processes:
Expand Down
59 changes: 59 additions & 0 deletions proposals/vector_buffer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"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 (erose) the geometry. Buffers can be applied to points, lines and polygons, but the results are always polygons. Multi-part types (e.g. `MultiPoint`) are also allowed.",
m-mohr marked this conversation as resolved.
Show resolved Hide resolved
"categories": [
"vector"
],
"experimental": true,
"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`).",
"schema": [
{
"type": "object",
"subtype": "geojson"
},
{
"type": "object",
"subtype": "vector-cube"
}
]
},
{
"name": "distance",
"description": "The distance of the buffer in the unit given by the `unit` parameter. A positive distance expands the geometries and results in outward buffering (dilation) while a negative distance shrinks the geometries and results in inward buffering (erosion).",
"schema": {
"type": "number",
"not": {
"const": 0
}
}
},
{
"name": "unit",
"description": "The unit the distance is given in, either in the unit of the spatial reference system (`null`, the default value) or in meters (`m`).",
"optional": true,
"default": null,
"schema": [
{
"title": "Unit of the SRS",
"type": "null"
},
{
"title": "Meters",
"type": "string",
"const": "m"
m-mohr marked this conversation as resolved.
Show resolved Hide resolved
}
]
}
],
"returns": {
"description": "Returns a vector data cube with the computed new geometries.",
"schema": {
"type": "object",
"subtype": "vector-cube"
}
}
}