File tree Expand file tree Collapse file tree 3 files changed +76
-46
lines changed Expand file tree Collapse file tree 3 files changed +76
-46
lines changed Original file line number Diff line number Diff line change 40
40
},
41
41
"namespace" : " https://raw.githubusercontent.com/ESA-APEx/apex_algorithms/3215de22eded7c87c46122f073d15c7258af26b4/openeo_udp/cropsar_px/cropsar_px.json" ,
42
42
"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
54
43
}
55
44
},
56
45
"reference_data" : {
Original file line number Diff line number Diff line change @@ -18,8 +18,60 @@ The following example demonstrates how the 'CropSAR_px' process can be executed
18
18
This batch job produces a netCDF file containing the results.
19
19
Additionally, the ` GeoTIFF ` format can be specified to yield separate files for each date.
20
20
21
- > Note that generating multiple GeoTIFF files as output is a unique feature available only in a batch job.
21
+ ``` python
22
22
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()
25
25
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.
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments