forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clip.json
68 lines (68 loc) · 1.98 KB
/
clip.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
{
"id": "clip",
"summary": "Clips values between minimum and maximum values.",
"description": "Clips an array of numbers between specified minimum and maximum values. All values larger than the maximal value will have the maximal value, all values lower than minimal value will have the minimal value.",
"categories": [
"math"
],
"parameter_order": ["data", "min", "max"],
"parameters": {
"data": {
"description": "An array of numbers.",
"schema": {
"type": "array",
"items": {
"type": [
"number",
"null"
]
}
},
"required": true
},
"min": {
"description": "Minimum value. All values lower than this value will be set to the value of this parameter.",
"schema": {
"type": "number"
},
"required": true
},
"max": {
"description": "Maximum value. All values greater than this value will be set to the value of this parameter.",
"schema": {
"type": "number"
},
"required": true
}
},
"returns": {
"description": "An array with the values clipped to the specified range.",
"schema": {
"type": "array",
"items": {
"type": [
"number",
"null"
]
}
}
},
"examples": [
{
"arguments": {
"data": [-2,-1,0,1,2],
"min": -1,
"max": 1
},
"returns": [-1,-1,0,1,1]
},
{
"arguments": {
"data": [-0.1,-0.001,null,0,0.25,0.75,1.001,null],
"min": 0,
"max": 1
},
"returns": [0,0,null,0,0.25,0.75,1,null]
}
]
}