Skip to content

Commit 9532cb1

Browse files
committed
Fix formatting
1 parent a2e3780 commit 9532cb1

File tree

1 file changed

+79
-75
lines changed

1 file changed

+79
-75
lines changed

meta/implementation.md

Lines changed: 79 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,17 @@ the evaluation should stop and provide the result directly.
3131
This is basically the same behavior that is also described in the processes `all` and `any`.
3232

3333
For example, the condition `A > 0 or B > 0` should only execute `B > 0` if `A > 0` is false as
34-
otherwise the result is already unambiguous and will be `true` regardless of the rest of the
34+
otherwise the result is already unambiguous and will be `true` regardless of the rest of the
3535
condition.
3636

37-
Implementing this behavior does not have any negative side-effects so that
37+
Implementing this behavior does not have any negative side-effects so that
3838
comparability and reproducibility of the results is still given.
3939

4040
## Enums for processing methods
4141

4242
There are numerours processes that provide a predefined set of processing methods.
4343
For example:
44+
4445
- `ard_surface_reflectance`: `atmospheric_correction_method` and `cloud_detection_method`
4546
- `athmospheric_correction`: `method`
4647
- `cloud_detection`: `method`
@@ -63,53 +64,53 @@ This applies similarly to other enums specied in parameter schemas, e.g. the
6364

6465
The processes mentioned above have all at least one parameter for proprietary
6566
options that can be passed to the corresponsing `methods`:
67+
6668
- `ard_surface_reflectance`: `atmospheric_correction_options` and `cloud_detection_options`
6769
- `athmospheric_correction`: `options`
6870
- `cloud_detection`: `options`
6971

7072
By default, the parameters don't allow any value except an empty opject.
71-
Back-ends have to either remove the parameter or define schema to give user
73+
Back-ends have to either remove the parameter or define schema to give user
7274
details about the supported parameters per supported method.
7375

7476
For example, if you support the methods `iCor` and `FORCE` in `atmospheric_correction`,
7577
you may define something like the following for the parameter:
7678

7779
```json
7880
{
79-
"description": "Proprietary options for the atmospheric correction method.",
80-
"name": "options",
81-
"optional": true,
82-
"default": {},
83-
"schema": [
84-
{
85-
"title": "FORCE options",
86-
"type": "object",
87-
"properties": {
88-
"force_option1": {
89-
"type": "number",
90-
"description": "Description for option 1",
91-
"default": 0
92-
},
93-
"force_option2": {
94-
"type": "boolean",
95-
"description": "Description for option 1",
96-
"default": true
97-
}
98-
}
99-
},
100-
{
101-
"title": "iCor options",
102-
"type": "object",
103-
"properties": {
104-
"icor_option1": {
105-
"type": "string",
106-
"description": "Description for option 1",
107-
"default": "example"
108-
}
109-
}
110-
}
111-
112-
]
81+
"description": "Proprietary options for the atmospheric correction method.",
82+
"name": "options",
83+
"optional": true,
84+
"default": {},
85+
"schema": [
86+
{
87+
"title": "FORCE options",
88+
"type": "object",
89+
"properties": {
90+
"force_option1": {
91+
"type": "number",
92+
"description": "Description for option 1",
93+
"default": 0
94+
},
95+
"force_option2": {
96+
"type": "boolean",
97+
"description": "Description for option 1",
98+
"default": true
99+
}
100+
}
101+
},
102+
{
103+
"title": "iCor options",
104+
"type": "object",
105+
"properties": {
106+
"icor_option1": {
107+
"type": "string",
108+
"description": "Description for option 1",
109+
"default": "example"
110+
}
111+
}
112+
}
113+
]
113114
}
114115
```
115116

@@ -149,24 +150,26 @@ Back-ends should not execute the processes for log levels that are not matching
149150

150151
### Data Types
151152

152-
The process is only useful for users if a common behavior for data types passed into the `data` parameter has been agreed on across implementations.
153+
The process is only useful for users if a common behavior for data types passed into the `data` parameter has been agreed on across implementations.
153154

154155
The following chapters include some proposals for common data (sub) types, but it is incomplete and will be extended in the future.
155156
Also, for some data types a JSON encoding is missing, we'll add more details once agreed upon:
156157
<https://github.com/Open-EO/openeo-processes/issues/299>
157158

158159
#### Scalars
160+
159161
For the data types boolean, numbers, strings and null it is recommended to log them as given.
160162

161163
#### Arrays
162164

163165
It is recommended to summarize arrays as follows:
166+
164167
```js
165168
{
166-
"data": [3,1,6,4,8], // Return a reasonable excerpt of the data, e.g. the first 5 or 10 elements
167-
"length": 10, // Return the length of the array, this is important to determine whether the data above is complete or an excerpt
168-
"min": 0, // optional: Return additional statstics if possible, ideally use the corresponsing openEO process names as keys
169-
"max": 10
169+
"data": [3,1,6,4,8], // Return a reasonable excerpt of the data, e.g. the first 5 or 10 elements
170+
"length": 10, // Return the length of the array, this is important to determine whether the data above is complete or an excerpt
171+
"min": 0, // optional: Return additional statstics if possible, ideally use the corresponsing openEO process names as keys
172+
"max": 10
170173
}
171174
```
172175

@@ -178,38 +181,38 @@ The top-level object and/or each dimension can be enhanced with additional stats
178181

179182
```js
180183
{
181-
"cube:dimensions": {
182-
"x": {
183-
"type": "spatial",
184-
"axis": "x",
185-
"extent": [8.253, 12.975],
186-
"reference_system": 4326
187-
},
188-
"y": {
189-
"type": "spatial",
190-
"axis": "y",
191-
"extent": [51.877,55.988],
192-
"reference_system": 4326
193-
},
194-
"t": {
195-
"type": "temporal",
196-
"values": [
197-
"2015-06-21T12:56:55Z",
198-
"2015-06-23T09:12:14Z",
199-
"2015-06-25T23:44:44Z",
200-
"2015-06-27T21:11:34Z",
201-
"2015-06-30T17:33:12Z"
202-
],
203-
"step": null
204-
},
205-
"bands": {
206-
"type": "bands",
207-
"values": ["NDVI"]
208-
}
209-
},
210-
// optional: Return additional data or statstics for the data cube if possible (see also the chapter for "Arrays" above).
211-
"min": -1,
212-
"max": 1
184+
"cube:dimensions": {
185+
"x": {
186+
"type": "spatial",
187+
"axis": "x",
188+
"extent": [8.253, 12.975],
189+
"reference_system": 4326
190+
},
191+
"y": {
192+
"type": "spatial",
193+
"axis": "y",
194+
"extent": [51.877,55.988],
195+
"reference_system": 4326
196+
},
197+
"t": {
198+
"type": "temporal",
199+
"values": [
200+
"2015-06-21T12:56:55Z",
201+
"2015-06-23T09:12:14Z",
202+
"2015-06-25T23:44:44Z",
203+
"2015-06-27T21:11:34Z",
204+
"2015-06-30T17:33:12Z"
205+
],
206+
"step": null
207+
},
208+
"bands": {
209+
"type": "bands",
210+
"values": ["NDVI"]
211+
}
212+
},
213+
// optional: Return additional data or statstics for the data cube if possible (see also the chapter for "Arrays" above).
214+
"min": -1,
215+
"max": 1
213216
}
214217
```
215218

@@ -221,8 +224,9 @@ To improve interoperability openEO processes, version 1.2.0 added details about
221224
A survey has shown that most libraries implement type 7 and as such this was chosen to be the default.
222225

223226
We have found some libraries that can be used for an implementation:
227+
224228
- Java: [Apache Commons Math Percentile](http://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/descriptive/rank/Percentile.html), choose the [estimation type `R_7`](http://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html#R_7)
225229
- JavaScript: [d3](https://github.com/d3/d3-array/blob/v2.8.0/README.md#quantile), has only type 7 implemented.
226230
- Julia: [Statistics.quantile](https://docs.julialang.org/en/v1/stdlib/Statistics/#Statistics.quantile!), type 7 is the default.
227-
- Python: [numpy](https://numpy.org/doc/stable/reference/generated/numpy.quantile.html), [pandas](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.quantile.html), [xarray](http://xarray.pydata.org/en/stable/generated/xarray.DataArray.quantile.html) - type 7 (called 'linear' for the interpolation parameter) is the default for all of them.
231+
- Python: [numpy](https://numpy.org/doc/stable/reference/generated/numpy.quantile.html), [pandas](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.quantile.html), [xarray](http://xarray.pydata.org/en/stable/generated/xarray.DataArray.quantile.html) - type 7 (called 'linear' for the interpolation parameter) is the default for all of them.
228232
- R: [quantile](https://stat.ethz.ch/R-manual/R-patched/library/stats/html/quantile.html) - type 7 is the default.

0 commit comments

Comments
 (0)