-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathburntmapping_chunks.json
202 lines (202 loc) · 8.21 KB
/
burntmapping_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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
{
"id": "burntmapping_chunks",
"summary": "Burnt area mapping",
"description": "Classical Normalized Burnt Ratio (NBR) difference is performed on a chunk of polygons using a UDF in ``chunk_polygon()``.",
"categories": [
" math > indices"
],
"links": [
{
"href": "https://openeo.vito.be/openeo/1.1/processes/u:ecce9fea04b8c9c76ac76b45b6ba00c20f211bda4856c14aa4475b8e8ed433cd%40egi.eu/burntmapping_chunks",
"rel": "canonical",
"title": "Public URL for user-defined process 'burntmapping_chunks'"
}
],
"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": "Previous_date",
"schema": {
"subtype": "temporal-interval",
"type": "array"
}
},
{
"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": "After_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"
}
}
],
"returns": {
"description": "A merged datacube with reduced temporal dimension representing a qualitative descriptor of burn severity",
"schema": {
"type": "object",
"subtype": "raster-cube"
}
},
"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\n\ndef apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:\n # access the underlying xarray\n inarr = cube.get_array()\n\n # nbr\n nir = inarr.loc[:,'B08']\n swir = inarr.loc[:,'B12']\n nbr = (nir-swir)/(nir+swir)\n \n # extend bands dim\n nbr=nbr.expand_dims(dim='bands', axis=-3).assign_coords(bands=['nbr'])\n \n # wrap back to datacube and return\n return XarrayDataCube(nbr)\n"
},
"process_id": "run_udf",
"result": true
}
}
}
},
"process_id": "chunk_polygon"
},
"chunkpolygon2": {
"arguments": {
"chunks": {
"from_parameter": "aoi"
},
"data": {
"from_node": "loadcollection2"
},
"process": {
"process_graph": {
"runudf2": {
"arguments": {
"data": {
"from_parameter": "data"
},
"runtime": "python",
"udf": "\nfrom openeo.udf import XarrayDataCube\n\n\ndef apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:\n # access the underlying xarray\n inarr = cube.get_array()\n\n # nbr\n nir = inarr.loc[:,'B08']\n swir = inarr.loc[:,'B12']\n nbr = (nir-swir)/(nir+swir)\n \n # extend bands dim\n nbr=nbr.expand_dims(dim='bands', axis=-3).assign_coords(bands=['nbr'])\n \n # wrap back to datacube and return\n return XarrayDataCube(nbr)\n"
},
"process_id": "run_udf",
"result": true
}
}
}
},
"process_id": "chunk_polygon"
},
"loadcollection1": {
"arguments": {
"bands": [
"B08",
"B12"
],
"id": "SENTINEL2_L1C",
"spatial_extent": null,
"temporal_extent": {
"from_parameter": "After_date"
}
},
"process_id": "load_collection"
},
"loadcollection2": {
"arguments": {
"bands": [
"B08",
"B12"
],
"id": "SENTINEL2_L1C",
"spatial_extent": null,
"temporal_extent": {
"from_parameter": "Previous_date"
}
},
"process_id": "load_collection"
},
"mergecubes1": {
"arguments": {
"cube1": {
"from_node": "reducedimension1"
},
"cube2": {
"from_node": "reducedimension2"
},
"overlap_resolver": {
"process_graph": {
"subtract1": {
"arguments": {
"x": {
"from_parameter": "x"
},
"y": {
"from_parameter": "y"
}
},
"process_id": "subtract",
"result": true
}
}
}
},
"process_id": "merge_cubes",
"result": true
},
"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"
},
"reducedimension2": {
"arguments": {
"data": {
"from_node": "chunkpolygon2"
},
"dimension": "t",
"reducer": {
"process_graph": {
"mean2": {
"arguments": {
"data": {
"from_parameter": "data"
}
},
"process_id": "mean",
"result": true
}
}
}
},
"process_id": "reduce_dimension"
}
}
}