Skip to content

Commit

Permalink
Add filter_vector
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Oct 6, 2022
1 parent bbdcaff commit 029a191
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- New processes in proposal state:
- `filter_vector`
- `fit_class_random_forest`
- `fit_regr_random_forest`
- `flatten_dimensions`
Expand Down
2 changes: 1 addition & 1 deletion load_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"name": "spatial_extent",
"description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\n* For raster data, the process loads the pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n* For vector data, the process loads the geometry into the data cube of the geometry is fully within the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n\nThe GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry,\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries, or\n* a `GeometryCollection` containing `Polygon` or `MultiPolygon` geometries. To maximize interoperability, `GeometryCollection` should be avoided in favour of one of the alternatives above.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.",
"description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\n* For raster data, the process loads the pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n* For vector data, the process loads the geometry into the data cube of the geometry is fully *within* the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n\nThe GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry,\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries, or\n* a `GeometryCollection` containing `Polygon` or `MultiPolygon` geometries. To maximize interoperability, `GeometryCollection` should be avoided in favour of one of the alternatives above.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.",
"schema": [
{
"title": "Bounding Box",
Expand Down
92 changes: 92 additions & 0 deletions proposals/filter_vector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"id": "filter_vector",
"summary": "Spatial vector filter using geometries",
"description": "Limits the vector data cube to the specified geometries. The process works on geometries as defined in the Simple Features standard by the OGC.",
"categories": [
"cubes",
"filter",
"vector"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "A vector data cube with the candidate geometries.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "vector"
}
]
}
},
{
"name": "geometries",
"description": "One or more base geometries used for filtering, given as GeoJSON or vector data cube.\n\nTo maximize interoperability, `GeometryCollection` and multi geometries (e.g. `MultiPolygon`) should be be avoided.",
"schema": [
{
"type": "object",
"subtype": "geojson"
},
{
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "vector"
}
]
}
]
},
{
"name": "relation",
"description": "The spatial filter predicate for comparing the geometries provided through (a) `geometries (base geometries) and (b) `data` (candidate geometries).",
"schema": {
"type": "string",
"enum": [
"intersects",
"disjoint",
"equals",
"touches",
"crosses",
"overlaps",
"contains",
"within"
]
},
"optional": true,
"default": "intersects"
}
],
"returns": {
"description": "A vector data cube restricted to the specified geometries. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the vector dimension has less (or the same) dimension labels.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "spatial",
"axis": [
"x",
"y"
]
}
]
}
},
"links": [
{
"href": "https://openeo.org/documentation/1.0/datacubes.html#filter",
"rel": "about",
"title": "Filters explained in the openEO documentation"
},
{
"href": "http://www.opengeospatial.org/standards/sfa",
"rel": "about",
"title": "Simple Features standard by the OGC"
}
]
}

0 comments on commit 029a191

Please sign in to comment.