forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clip.json
106 lines (106 loc) · 2.75 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
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
{
"id": "clip",
"summary": "Clip a value between a minimum and a maximum",
"description": "Clips a number between specified minimum and maximum values. A value larger than the maximum value is set to the maximum value, a value lower than the minimum value is set to the minimum value.\n\nThe no-data value `null` is passed through and therefore gets propagated.",
"categories": [
"math"
],
"parameters": [
{
"name": "x",
"description": "A number.",
"schema": {
"type": [
"number",
"null"
]
}
},
{
"name": "min",
"description": "Minimum value. If the value is lower than this value, the process will return the value of this parameter.",
"schema": {
"type": "number"
}
},
{
"name": "max",
"description": "Maximum value. If the value is greater than this value, the process will return the value of this parameter.",
"schema": {
"type": "number"
}
}
],
"returns": {
"description": "The value clipped to the specified range.",
"schema": {
"type": [
"number",
"null"
]
}
},
"examples": [
{
"arguments": {
"x": -5,
"min": -1,
"max": 1
},
"returns": -1
},
{
"arguments": {
"x": 10.001,
"min": 1,
"max": 10
},
"returns": 10
},
{
"arguments": {
"x": 0.000001,
"min": 0,
"max": 0.02
},
"returns": 0.000001
},
{
"arguments": {
"x": null,
"min": 0,
"max": 1
},
"returns": null
}
],
"process_graph": {
"min": {
"process_id": "min",
"arguments": {
"data": [
{
"from_parameter": "max"
},
{
"from_parameter": "x"
}
]
}
},
"max": {
"process_id": "max",
"arguments": {
"data": [
{
"from_parameter": "min"
},
{
"from_node": "min"
}
]
},
"result": true
}
}
}