forked from eodcgmbh/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filter_labels.json
118 lines (118 loc) · 4.71 KB
/
filter_labels.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
"id": "filter_labels",
"summary": "Filter dimension labels based on a condition",
"description": "Filters the dimension labels in the data cube for the given dimension. Only the dimension labels that match the specified condition are preserved, all other labels with their corresponding data get removed.",
"categories": [
"cubes",
"filter"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "A data cube.",
"schema": {
"type": "object",
"subtype": "datacube"
}
},
{
"name": "condition",
"description": "A condition that is evaluated against each dimension label in the specified dimension. A dimension label and the corresponding data is preserved for the given dimension, if the condition returns `true`.",
"schema": {
"type": "object",
"subtype": "process-graph",
"parameters": [
{
"name": "value",
"description": "A single dimension label to compare against. The data type of the parameter depends on the dimension labels set for the dimension. Please note that for some dimension types a representation is used, e.g.\n\n* dates and/or times are usually strings compliant to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601),\n* geometries can be a WKT string or an identifier.",
"schema": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"name": "context",
"description": "Additional data passed by the user.",
"schema": {
"description": "Any data type."
},
"optional": true,
"default": null
}
],
"returns": {
"description": "`true` if the dimension label should be kept in the data cube, otherwise `false`.",
"schema": {
"type": "boolean"
}
}
}
},
{
"name": "dimension",
"description": "The name of the dimension to filter on. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist.",
"schema": {
"type": "string"
}
},
{
"name": "context",
"description": "Additional data to be passed to the condition.",
"schema": {
"description": "Any data type."
},
"optional": true,
"default": null
}
],
"returns": {
"description": "A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the given dimension has less (or the same) dimension labels.",
"schema": {
"type": "object",
"subtype": "datacube"
}
},
"exceptions": {
"DimensionNotAvailable": {
"message": "A dimension with the specified name does not exist."
}
},
"examples": [
{
"description": "Filters the data cube to only contain data from platform Sentinel-2A. This example assumes that the data cube has a dimension `platform` so that computations can distinguish between Sentinel-2A and Sentinel-2B data.",
"arguments": {
"data": {
"from_parameter": "sentinel2_data"
},
"condition": {
"process_graph": {
"eq": {
"process_id": "eq",
"arguments": {
"x": {
"from_parameter": "value"
},
"y": "Sentinel-2A",
"case_sensitive": false
},
"result": true
}
}
},
"dimension": "platform"
}
}
],
"links": [
{
"href": "https://openeo.org/documentation/1.0/datacubes.html#filter",
"rel": "about",
"title": "Filters explained in the openEO documentation"
}
]
}