Skip to content

Commit

Permalink
Add vector_buffer (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr authored Mar 15, 2022
1 parent 536508c commit f4d5d03
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `load_ml_model`
- `unflatten_dimension`
- `save_ml_model`
- `vector_buffer`
- `vector_to_random_points`
- `vector_to_regular_points`

Expand Down
42 changes: 42 additions & 0 deletions proposals/vector_buffer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"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. Multi-part types (e.g. `MultiPoint`) are also allowed.",
"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 of the spatial reference system. 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
}
}
}
],
"returns": {
"description": "Returns a vector data cube with the computed new geometries.",
"schema": {
"type": "object",
"subtype": "vector-cube"
}
}
}

0 comments on commit f4d5d03

Please sign in to comment.