Skip to content

Commit c9b5d96

Browse files
committed
Fixed a bug that kept users from executing process graphs and added a simpler way to process "standardized" processes. Bumped version number to 0.2.1.
1 parent 611dc39 commit c9b5d96

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

openeo.js

+23-12
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ class ProcessGraphNode {
6262
});
6363
}
6464

65+
processImg(process_id, args = {}) {
66+
// ToDo: Improve? Doesn't seem very tidy (changing an object from outer scope).
67+
// Should be solved with the new API version though
68+
args['imagery'] = this;
69+
return new ProcessNode(process_id, args);
70+
}
71+
6572
process(process_id, args, processParameterName, imagery = null) {
6673
// ToDo: Improve? Doesn't seem very tidy (changing an object from outer scope).
6774
// Should be solved with the new API version though
@@ -72,18 +79,7 @@ class ProcessGraphNode {
7279
}
7380

7481
execute(output_format, output_args = {}) {
75-
return OpenEO.HTTP.send({
76-
method: 'post',
77-
responseType: 'blob',
78-
url: '/execute',
79-
data: {
80-
process_graph: this,
81-
output: {
82-
format: output_format,
83-
args: output_args
84-
}
85-
}
86-
});
82+
return OpenEO.Jobs.executeSync(this, output_format, output_args);
8783
}
8884

8985
}
@@ -687,6 +683,21 @@ var OpenEO = {
687683

688684
getObject(job_id) {
689685
return new JobAPI(job_id);
686+
},
687+
688+
executeSync (process_graph, output_format, output_args = {}) {
689+
return OpenEO.HTTP.send({
690+
method: 'post',
691+
responseType: 'blob',
692+
url: '/execute',
693+
data: {
694+
process_graph: process_graph,
695+
output: {
696+
format: output_format,
697+
args: output_args
698+
}
699+
}
700+
});
690701
}
691702

692703
},

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openeo/js-client",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"author": "openEO Consortium",
55
"contributors": [
66
{

0 commit comments

Comments
 (0)