Skip to content

Commit 5731581

Browse files
committed
updated changes with dependencies and readme
1 parent 211ca1c commit 5731581

File tree

3 files changed

+76
-46
lines changed

3 files changed

+76
-46
lines changed

benchmark_scenarios/cropsar_px.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@
4040
},
4141
"namespace": "https://raw.githubusercontent.com/ESA-APEx/apex_algorithms/3215de22eded7c87c46122f073d15c7258af26b4/openeo_udp/cropsar_px/cropsar_px.json",
4242
"process_id": "cropsar_px"
43-
},
44-
"saveresult1": {
45-
"arguments": {
46-
"data": {
47-
"from_node": "cropsarpx1"
48-
},
49-
"format": "netCDF",
50-
"options": {}
51-
},
52-
"process_id": "save_result",
53-
"result": true
5443
}
5544
},
5645
"reference_data": {

openeo_udp/cropsar_px/README.md

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,60 @@ The following example demonstrates how the 'CropSAR_px' process can be executed
1818
This batch job produces a netCDF file containing the results.
1919
Additionally, the `GeoTIFF` format can be specified to yield separate files for each date.
2020

21-
> Note that generating multiple GeoTIFF files as output is a unique feature available only in a batch job.
21+
```python
2222

23-
By default, the output variable is set to NDVI.
24-
However, by supplying one of the supported values listed above to the output parameter, a different result can be obtained.
23+
import openeo
24+
connection = openeo.connect("openeofed.dataspace.copernicus.eu").authenticate_oidc()
2525

26+
spat_ext = {
27+
"coordinates": [
28+
[
29+
[
30+
5.178303838475193,
31+
51.252856237848164
32+
],
33+
[
34+
5.178003609252369,
35+
51.25109194151486
36+
],
37+
[
38+
5.179280940922463,
39+
51.25103833409551
40+
],
41+
[
42+
5.179565949577788,
43+
51.25278555186941
44+
],
45+
[
46+
5.178303838475193,
47+
51.252856237848164
48+
]
49+
]
50+
],
51+
"type": "Polygon"
52+
}
53+
54+
startdate = "2021-01-01"
55+
enddate = "2021-01-20"
56+
cropsarpx_id = 'cropsar_px'
57+
namespace = "REPLACE_WITH_NAMESPACE"
58+
59+
cropsarpx = connection.datacube_from_process(
60+
process_id=cropsarpx_id,
61+
namespace=namespace,
62+
spatial_extent=spat_ext,
63+
startdate=startdate,
64+
enddate=enddate,
65+
output="NDVI"
66+
)
67+
68+
cropsarpx.execute_batch('results/cropsar_px_290125.nc', title=f'cropsar_px', job_options={
69+
"executor-memory": "2G",
70+
"executor-memoryOverhead": "500m",
71+
"python-memory": "3G"
72+
})
73+
74+
```
75+
76+
77+
Refer to this [blog post](https://blog.vito.be/remotesensing/cropsar2023) for more information on how to run batch jobs.

openeo_udp/cropsar_px/cropsar_px.json

Lines changed: 21 additions & 32 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)