-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Milestone
Description
Use case: user defines a user defined process with aspatial_extent parameter with the "bounding box" schema like
openeo-processes/meta/subtype-schemas.json
Lines 13 to 70 in 6141771
| "bounding-box": { | |
| "type": "object", | |
| "subtype": "bounding-box", | |
| "title": "Bounding Box", | |
| "description": "A bounding box with the required fields `west`, `south`, `east`, `north` and optionally `base`, `height`, `crs`. The `crs` is a EPSG code or a WKT2:2018 string.", | |
| "required": [ | |
| "west", | |
| "south", | |
| "east", | |
| "north" | |
| ], | |
| "properties": { | |
| "west": { | |
| "description": "West (lower left corner, coordinate axis 1).", | |
| "type": "number" | |
| }, | |
| "south": { | |
| "description": "South (lower left corner, coordinate axis 2).", | |
| "type": "number" | |
| }, | |
| "east": { | |
| "description": "East (upper right corner, coordinate axis 1).", | |
| "type": "number" | |
| }, | |
| "north": { | |
| "description": "North (upper right corner, coordinate axis 2).", | |
| "type": "number" | |
| }, | |
| "base": { | |
| "description": "Base (optional, lower left corner, coordinate axis 3).", | |
| "type": [ | |
| "number", | |
| "null" | |
| ], | |
| "default": null | |
| }, | |
| "height": { | |
| "description": "Height (optional, upper right corner, coordinate axis 3).", | |
| "type": [ | |
| "number", | |
| "null" | |
| ], | |
| "default": null | |
| }, | |
| "crs": { | |
| "description": "Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/) or [WKT2 CRS string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.", | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/epsg-code" | |
| }, | |
| { | |
| "$ref": "#/definitions/wkt2-definition" | |
| } | |
| ], | |
| "default": 4326 | |
| } | |
| } | |
| }, |
How to extract, for example, the "crs" property from that object in a process graph, e.g. to be able to pass it through context to a UDF?
array_element with argument label="crs" comes to mind, but the value of the parameter is an object, not an array, so that's technically not valid.
Would it make sense to expand the scope of array_element to objects? Or would it be cleaner to add some kind of new process, e.g. object_property(object data, string property): any?