Skip to content

Commit

Permalink
Merge branch 'draft' into issue-73
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr authored Jan 13, 2020
2 parents 85003d8 + b28eb61 commit a78abd3
Show file tree
Hide file tree
Showing 20 changed files with 308 additions and 408 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ deploy:
github-token: $GITHUB_TOKEN
local-dir: gh-pages
keep-history: true
committer-from-gh: true
name: openEO CI
email: openeo.ci@uni-muenster.de
on:
tags: true
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: gh-pages
keep-history: true
committer-from-gh: true
name: openEO CI
email: openeo.ci@uni-muenster.de
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(master|draft)$
16 changes: 12 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `any`
- `array_find`
- `drop_dimension`
- `mask_polygon`
- `load_uploaded_files`
- `rename_labels`
- Added further examples
Expand All @@ -22,31 +23,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Schema format/subtype `callback` has been renamed to `process-graph`.
- Default values are now specified on the parameter-level, not in the JSON schemas.
- Processes supporting multiple data types in parameters or return values with `anyOf` are now listing the data types directly as array. `anyOf` is discouraged.
- Comparison processes `eq`, `gt`, `gte`, `lt`, `lte`, `neq` and `between` accept all data types as input for the operands.
- `add_dimension`: Parameter `value` renamed to `label`.
- `apply_dimension`: Replaced with a completely new definition. [#73](https://github.com/Open-EO/openeo-processes/issues/73)
- `aggregate_polygon`: The data cube implicitly gets restricted to the bounds of the polygons as if `filter_polygon` would have been used beforehand. [#101](https://github.com/Open-EO/openeo-processes/issues/101)
- `clip`: Works on a single value instead on arrays (replaced parameter `data` with `x`). [#75](https://github.com/Open-EO/openeo-processes/issues/75)
- `debug`: Replaced with a completely new definition. [#82](https://github.com/Open-EO/openeo-processes/issues/71), [API#100](https://github.com/Open-EO/openeo-api/issues/100), [API#214](https://github.com/Open-EO/openeo-api/issues/214)
- `filter_bands`: Merged parameters `bands` and `common_names`. [#77]( https://github.com/Open-EO/openeo-processes/issues/77)
- `load_collection`: Parameter `bands` accepts common band names. [#77]( https://github.com/Open-EO/openeo-processes/issues/77)
- `filter_bands`: Merged parameters `bands` and `common_names`. [#77](https://github.com/Open-EO/openeo-processes/issues/77)
- `load_collection`: Parameter `bands` accepts common band names. [#77](https://github.com/Open-EO/openeo-processes/issues/77)
- `ndvi` and `normalized_difference`: Rewrite of the processes with a completely new behavior. [#60](https://github.com/Open-EO/openeo-processes/issues/60)
- `reduce`: Reducers can't return multiple values any longer. Parameter `target_dimension` was therefore removed. [#73](https://github.com/Open-EO/openeo-processes/issues/73)
- `resample_spatial`: Default value of parameter `align` changed from `lower-left` to `upper-left`. [#61](https://github.com/Open-EO/openeo-processes/issues/61)
- The following operations work on two values instead on a sequence of values: `and`, `divide`, `multiply`, `or`, `subtract`, `xor`. [#85](https://github.com/Open-EO/openeo-processes/issues/85)
- `product` works as before, but is not an alias of `multiply` any longer. [#85](https://github.com/Open-EO/openeo-processes/issues/85)
- `text_begins`, `text_contains`, `text_ends`: `null` values are supported and get passed through.

### Deprecated
- `filter_bbox`, `load_collection`, `resample_spatial`: PROJ definitions are deprecated in favor of EPSG codes, WKT2 and PROJJSON. [#58](https://github.com/Open-EO/openeo-processes/issues/58)

### Removed
- `reduce`: The `null` (no-operation) reducer has been removed. Use the process `drop_dimension` instead. [#57](https://github.com/Open-EO/openeo-processes/issues/57)
- The following operations don't support `ignore_nodata` any longer: `and`, `divide`, `multiply`, `or`, `subtract`, `xor`. [#85](https://github.com/Open-EO/openeo-processes/issues/85)
- `aggregate_polygon`: Doesn't allow returning a GeoJSON any longer.
- `mask`: The mask parameter doesn't accept vectors (polygons) any longer. Use process `mask_polygon` instead. [#110](https://github.com/Open-EO/openeo-processes/issues/110)
- `reduce`: The `null` (no-operation) reducer has been removed. Use the process `drop_dimension` instead. [#57](https://github.com/Open-EO/openeo-processes/issues/57)
- Removed processes:
- `find_collections`: Use `load_collection` and manual data discovery through the clients. [API#52](https://github.com/Open-EO/openeo-api/issues/52)
- `output`: Use `debug` instead.

### Fixed
- Several clarifications in written texts. [#86](https://github.com/Open-EO/openeo-processes/issues/86)
- `between` may return a `null` value.
- `filter_bbox`, `load_collection`: The schema for the property `crs` in the parameters `extent`/`spatial_extent` contained invalid JSON Schema.
- `merge_cubes`: Clarified merging behavior with several examples.

## [0.4.2] - 2019-06-11

Expand All @@ -69,4 +77,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
First version which is separated from the openEO API. Complete rework of all processes.

## Legacy versions
Older versions of the processes were released as part of the openEO API, see the corresponding changelog for more information.
Older versions of the processes were released as part of the openEO API, see the corresponding changelog for more information.
20 changes: 7 additions & 13 deletions aggregate_polygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"required": true
},
"name": {
"description": "The property name (for GeoJSON) or the new dimension name (for vector cubes) to be used for storing the results. Defaults to `result`.",
"description": "The new dimension name to be used for storing the results. Defaults to `result`.",
"schema": {
"type": "string"
},
Expand All @@ -88,17 +88,11 @@
}
},
"returns": {
"description": "A vector data cube or a GeoJSON object, depending on the input of the `polygons` parameter.\n\nThe computed value is stored in a property (GeoJSON) or dimension (vector cube) with the name that was specified in the parameter `name`.\n\nThe computation also stores information about the total count of pixels (valid + invalid pixels) and the number of valid pixels (see ``is_valid()``) in each geometry. In GeoJSON these are stored as properties with the names `{name}_total_count` and `{name}_valid_count` (replace `{name}` with the value of the `name` parameter). In a vector data cube, these values are stored as attributes of the result value with the attribute names `total_count` and `valid_count`.\n\nIf the input was GeoJSON and the therefore the return value is also a GeoJSON object, the geometries (`Polygon` or `GeometryCollection`) get wrapped in a `Feature` or `FeatureCollection` respectively. The results of the computations are stored in the `properties` of each GeoJSON `Feature`.",
"schema": [
{
"type": "object",
"subtype": "geojson"
},
{
"type": "object",
"subtype": "vector-cube"
}
]
"description": "A vector data cube with the computed results. The vector data cube implicitly gets restricted to the bounds of the polygons as if ``filter_polygon()`` would have been used with the same values for the corresponding parameters immediately before this process.\n\nThe computed value is stored in dimension with the name that was specified in the parameter `name`.\n\nThe computation also stores information about the total count of pixels (valid + invalid pixels) and the number of valid pixels (see ``is_valid()``) in each geometry. These values are stored as attributes of the result value with the attribute names `total_count` and `valid_count`.",
"schema": {
"type": "object",
"subtype": "vector-cube"
}
},
"exceptions": {
"TooManyDimensions": {
Expand Down Expand Up @@ -127,4 +121,4 @@
"title": "Background information on reduction operators (binary reducers) by Wikipedia"
}
]
}
}
6 changes: 3 additions & 3 deletions array_contains.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "array_contains",
"summary": "List contains an element",
"description": "Checks whether the array specified for `data` contains the value specified in `value`. Returns `true` if there's a match, otherwise `false`.\n\n**Remarks:**\n\n* To get the index of the element found, use ``array_find()``.\n* Data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.",
"description": "Checks whether the array specified for `data` contains the value specified in `value`. Returns `true` if there's a match, otherwise `false`.\n\n**Remarks:**\n\n* To get the index of the element found, use ``array_find()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.",
"categories": [
"arrays",
"comparison"
Expand Down Expand Up @@ -108,7 +108,7 @@
2
]
},
"returns": true
"returns": false
},
{
"arguments": {
Expand Down Expand Up @@ -140,7 +140,7 @@
"a": "b"
}
},
"returns": true
"returns": false
}
]
}
6 changes: 3 additions & 3 deletions array_find.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "array_find",
"summary": "Get the index of an element in an array",
"description": "Checks whether the array specified for `data` contains the value specified in `value` and returns the zero-based index for the first match. If there's no match, `-1` is returned.\n\n**Remarks:**\n\n* To get a boolean value returned use ``array_contains()``.\n* Data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.",
"description": "Checks whether the array specified for `data` contains the value specified in `value` and returns the zero-based index for the first match. If there's no match, `-1` is returned.\n\n**Remarks:**\n\n* To get a boolean value returned use ``array_contains()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.",
"categories": [
"arrays"
],
Expand Down Expand Up @@ -98,7 +98,7 @@
2
]
},
"returns": 0
"returns": -1
},
{
"arguments": {
Expand Down Expand Up @@ -130,7 +130,7 @@
"a": "b"
}
},
"returns": 0
"returns": -1
}
]
}
33 changes: 8 additions & 25 deletions between.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "between",
"summary": "Between comparison",
"description": "By default this process checks whether `x` is greater than or equal to `min` and lower than or equal to `max`. Therefore, this process is an alias for `and([gte(x, min), lte(x, max)])` and all definitions from these processes apply here as well.\n\nIf `exclude_max` is set to `true` the upper bound is excluded so that the process checks whether `x` is greater than or equal to `min` and lower than `max`. In this case the process works the same as executing `and([gte(x, min), lt(x, max)])`.\n\nLower and upper bounds are not allowed to be swapped. So `min` MUST be lower than or equal to `max` or otherwise the process always returns `false`.",
"description": "By default this process checks whether `x` is greater than or equal to `min` and lower than or equal to `max`. Therefore, this process is an alias for `and([gte(x, min), lte(x, max)])` and all definitions from ``and()``, ``gte()`` and ``lte()`` apply here as well.\n\nIf `exclude_max` is set to `true` the upper bound is excluded so that the process checks whether `x` is greater than or equal to `min` and lower than `max`. In this case the process works the same as executing `and([gte(x, min), lt(x, max)])`.\n\nLower and upper bounds are not allowed to be swapped. So `min` MUST be lower than or equal to `max` or otherwise the process always returns `false`.",
"categories": [
"comparison"
],
Expand All @@ -14,29 +14,9 @@
"parameters": {
"x": {
"description": "The value to check.",
"schema": [
{
"type": "number"
},
{
"type": "null"
},
{
"type": "string",
"format": "date-time",
"subtype": "date-time"
},
{
"type": "string",
"format": "date",
"subtype": "date"
},
{
"type": "string",
"format": "time",
"subtype": "time"
}
],
"schema": {
"description": "Any data type is allowed."
},
"required": true
},
"min": {
Expand Down Expand Up @@ -98,7 +78,10 @@
"returns": {
"description": "`true` if `x` is between the specified bounds, otherwise `false`.",
"schema": {
"type": "boolean"
"type": [
"boolean",
"null"
]
}
},
"examples": [
Expand Down
82 changes: 22 additions & 60 deletions eq.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "eq",
"summary": "Equal to comparison",
"description": "Compares whether `x` is strictly equal to `y`.\n\n**Remarks:**\n\n* Data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*. Nevertheless, an integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`.\n* If any of the operands is `null`, the return value is `null`.\n* Strings are expected to be encoded in UTF-8 by default.\n* Temporal strings MUST be compared differently than other strings and MUST NOT be compared based on their string representation due to different possible representations. For example, the UTC time zone representation `Z` has the same meaning as `+00:00`.",
"description": "Compares whether `x` is strictly equal to `y`.\n\n**Remarks:**\n\n* Data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*. Nevertheless, an integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`.\n* If any operand is `null`, the return value is `null`.\n* If any operand is an array or object, the return value is `false`.\n* Strings are expected to be encoded in UTF-8 by default.\n* Temporal strings MUST be compared differently than other strings and MUST NOT be compared based on their string representation due to different possible representations. For example, the UTC time zone representation `Z` has the same meaning as `+00:00`.",
"categories": [
"texts",
"comparison"
Expand All @@ -15,68 +15,16 @@
"parameters": {
"x": {
"description": "First operand.",
"schema": [
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "string"
},
{
"type": "string",
"format": "date-time",
"subtype": "date-time"
},
{
"type": "string",
"format": "date",
"subtype": "date"
},
{
"type": "string",
"format": "time",
"subtype": "time"
}
],
"schema": {
"description": "Any data type is allowed."
},
"required": true
},
"y": {
"description": "Second operand.",
"schema": [
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "string"
},
{
"type": "string",
"format": "date-time",
"subtype": "date-time"
},
{
"type": "string",
"format": "date",
"subtype": "date"
},
{
"type": "string",
"format": "time",
"subtype": "time"
}
],
"schema": {
"description": "Any data type is allowed."
},
"required": true
},
"delta": {
Expand All @@ -98,7 +46,7 @@
}
},
"returns": {
"description": "Returns `true` if `x` is equal to `y`, `null` if any of the operands is `null`, otherwise `false`.",
"description": "Returns `true` if `x` is equal to `y`, `null` if any operand is `null`, otherwise `false`.",
"schema": {
"type": [
"boolean",
Expand Down Expand Up @@ -128,6 +76,13 @@
},
"returns": false
},
{
"arguments": {
"x": 0,
"y": false
},
"returns": false
},
{
"arguments": {
"x": 1.02,
Expand Down Expand Up @@ -197,6 +152,13 @@
"y": "2018-01-01T01:00:00+01:00"
},
"returns": true
},
{
"arguments": {
"x": [1,2,3],
"y": [1,2,3]
},
"returns": false
}
]
}
Loading

0 comments on commit a78abd3

Please sign in to comment.