forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
or.json
99 lines (99 loc) · 3.14 KB
/
or.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
{
"id": "or",
"summary": "Is at least one value true?",
"description": "Checks if **at least one** of the values is true. Evaluates each expression from the first to the last element and stops once the outcome is unambiguous.\n\nIf only one value is given the process evaluates to the given value. If no value is given (i.e. the array is empty) the process returns `null`.\n\nBy default all no-data values are ignored so that the process returns `true` if at least one of the other values is true and otherwise returns `false`.\nSetting the `ignore_nodata` flag to `false` considers no-data values so that `null` is a valid logical object. If a component is `null`, the result will be `null` if the outcome is ambiguous. See the following truth table:\n\n```\n || null | false | true\n----- || ---- | ----- | ----\nnull || null | null | true\nfalse || null | false | true\ntrue || true | true | true\n```",
"categories": [
"logic",
"reducer"
],
"parameter_order": ["expressions", "ignore_nodata"],
"parameters": {
"expressions": {
"description": "A set of boolean values.",
"schema": {
"type": "array",
"items": {
"type": [
"boolean",
"null"
]
}
},
"required": true
},
"ignore_nodata": {
"description": "Indicates whether no-data values are ignored or not and ignores them by default.",
"schema": {
"type": "boolean",
"default": true
}
}
},
"returns": {
"description": "Boolean result of the logical expressions.",
"schema": {
"type": [
"boolean",
"null"
]
}
},
"examples": [
{
"arguments": {
"expressions": [false, null]
},
"returns": false
},
{
"arguments": {
"expressions": [true, null]
},
"returns": true
},
{
"arguments": {
"expressions": [false, null],
"ignore_nodata": false
},
"returns": null
},
{
"arguments": {
"expressions": [true, null],
"ignore_nodata": false
},
"returns": true
},
{
"arguments": {
"expressions": [true, false, true, false]
},
"returns": true
},
{
"arguments": {
"expressions": [true, false]
},
"returns": true
},
{
"arguments": {
"expressions": [false, false]
},
"returns": false
},
{
"arguments": {
"expressions": [true]
},
"returns": true
},
{
"arguments": {
"expressions": []
},
"returns": null
}
]
}