-
Notifications
You must be signed in to change notification settings - Fork 6
/
rescale_chunks.json
106 lines (106 loc) · 3.94 KB
/
rescale_chunks.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": "rescale_chunks",
"summary": "Rescaling of RGB within chunk of polygons",
"description": "A simple process for rescaling Sentinel 2 RGB images within polygon chunks that also showcases how to use ``chunk_polygon()`` with a (User Defined Function) UDF.",
"categories": [
"cubes"
],
"links": [
{
"href": "https://openeo.vito.be/openeo/1.1/processes/u:ecce9fea04b8c9c76ac76b45b6ba00c20f211bda4856c14aa4475b8e8ed433cd%40egi.eu/rescale_chunks",
"rel": "canonical",
"title": "Public URL for user-defined process 'rescale_chunks'"
}
],
"returns": {
"description": "A datacube rescaled with 0.0001",
"schema": {
"type": "object",
"subtype": "raster-cube"
}
},
"parameters": [
{
"description": "Left-closed temporal interval, i.e. an array with exactly two elements: The first element is the start of the temporal interval. The specified instance in time is included in the interval. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow RFC 3339. Also supports open intervals by setting one of the boundaries to null, but never both.",
"name": "date",
"schema": {
"subtype": "temporal-interval",
"type": "array"
}
},
{
"description": "Spatial extent for area of interest to calculate NBR, specified as GEOJSON.",
"name": "aoi",
"schema": {
"subtype": "geojson",
"type": "object"
}
}
],
"process_graph": {
"chunkpolygon1": {
"arguments": {
"chunks": {
"from_parameter": "aoi"
},
"data": {
"from_node": "loadcollection1"
},
"process": {
"process_graph": {
"runudf1": {
"arguments": {
"data": {
"from_parameter": "data"
},
"runtime": "python",
"udf": "\nfrom openeo.udf import XarrayDataCube\n\ndef apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:\n array = cube.get_array()\n array.values = 0.0001* array.values\n return cube\n"
},
"process_id": "run_udf",
"result": true
}
}
}
},
"process_id": "chunk_polygon"
},
"loadcollection1": {
"arguments": {
"bands": [
"B02",
"B03",
"B04"
],
"id": "SENTINEL2_L2A",
"spatial_extent": null,
"temporal_extent": {
"from_parameter": "date"
}
},
"process_id": "load_collection"
},
"reducedimension1": {
"arguments": {
"data": {
"from_node": "chunkpolygon1"
},
"dimension": "t",
"reducer": {
"process_graph": {
"mean1": {
"arguments": {
"data": {
"from_parameter": "data"
}
},
"process_id": "mean",
"result": true
}
}
}
},
"process_id": "reduce_dimension",
"result": true
}
}
}