Skip to content

Commit

Permalink
Updates according to recent discussions #331
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Mar 31, 2023
1 parent 9c4db0b commit 4b92981
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 76 deletions.
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- New processes in proposal state:
- `date_between`
- `date_difference`
- `filter_vector`
- `flatten_dimensions`
Expand Down Expand Up @@ -37,12 +38,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Allow `null` as default value for units.
- Input and Output for the `process` can either be data cubes or arrays (if one-dimensional). [#387](https://github.com/Open-EO/openeo-processes/issues/387)
- `run_udf`: Allow all data types instead of just objects in the `context` parameter. [#376](https://github.com/Open-EO/openeo-processes/issues/376)
- `load_collection` and `load_result`:
- Require at least one band if not set to `null`. [#372](https://github.com/Open-EO/openeo-processes/issues/372)
- `load_collection` and `load_result`/`load_stac`:
- Require at least one band "if not set to `null`. [#372](https://github.com/Open-EO/openeo-processes/issues/372)
- Added a `NoDataAvailable` exception
- `aggregate_temporal`, `filter_temporal`, `load_collection` and `load_result`:
- `aggregate_temporal`, `filter_temporal`, `load_collection` and `load_result`/`load_stac`:
- The temporal intervals must always be non-empty, i.e. the second instance in time must be after the first instance in time. [#331](https://github.com/Open-EO/openeo-processes/issues/331)
- `24` as the hour is not allowed anymore.
- `24` as the hour is not allowed anymore. [#331](https://github.com/Open-EO/openeo-processes/issues/331)
- `inspect`: The parameter `message` has been moved to be the second argument. [#369](https://github.com/Open-EO/openeo-processes/issues/369)
- `mask` and `merge_cubes`: The spatial dimensions `x` and `y` can now be resampled implicitly instead of throwing an error. [#402](https://github.com/Open-EO/openeo-processes/issues/402)
- `save_result`: Added a more concrete `DataCubeEmpty` exception.
Expand All @@ -54,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated the processes based on the subtypes `raster-cube` or `vector-cube` to work with the subtype `datacube` instead. [#68](https://github.com/Open-EO/openeo-processes/issues/68)
- `sort` and `order`: The ordering of ties is not defined anymore. [#409](https://github.com/Open-EO/openeo-processes/issues/409)
- `quantiles`: Parameter `probabilities` provided as array must be in ascending order. [#297](https://github.com/Open-EO/openeo-processes/pull/297)
- `climatological_normal`: The `climatology_period` parameter accepts an array of integers instead of strings. [#331](https://github.com/Open-EO/openeo-processes/issues/331)

### Deprecated

Expand All @@ -62,7 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed

- The `examples` folder has been migrated to the [openEO Community Examples](https://github.com/Open-EO/openeo-community-examples/tree/main/processes) repository.
- `between`: Support for temporal comparison.
- `between`: Support for temporal comparison. Use `date_between` instead. [#331](https://github.com/Open-EO/openeo-processes/issues/331)
- Deprecated `GeometryCollections` are not supported any longer. [#389](https://github.com/Open-EO/openeo-processes/issues/389)
- Deprecated PROJ definitions for the CRS are not supported any longer.
- `load_result`:
Expand All @@ -72,6 +74,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The comparison processes `eq`, `neq`, `lt`, `lte`, `gt`, `gte` and `array_contains`:
- Removed support for temporal comparison. Instead explicitly use `date_difference`.
- Removed support for the input data types array and object. [#208](https://github.com/Open-EO/openeo-processes/issues/208)
- `sort` and `order`: Removed support for time-only values. [#331](https://github.com/Open-EO/openeo-processes/issues/331)

### Fixed

Expand Down
22 changes: 9 additions & 13 deletions aggregate_temporal.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"name": "intervals",
"description": "Left-closed temporal intervals, which are allowed to overlap. Each temporal interval in the array has exactly two elements:\n\n1. The first element is the start of the temporal interval. The specified time instant is **included** in the interval.\n2. The second element is the end of the temporal interval. The specified time instant is **excluded** from the interval.\n\nThe second element must always be greater/later than the first element. Otherwise, a `TemporalExtentEmpty` exception is thrown.\n\nThe specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html).",
"description": "Left-closed temporal intervals, which are allowed to overlap. Each temporal interval in the array has exactly two elements:\n\n1. The first element is the start of the temporal interval. The specified time instant is **included** in the interval.\n2. The second element is the end of the temporal interval. The specified time instant is **excluded** from the interval.\n\nThe second element must always be greater/later than the first element, except for times. Otherwise, a `TemporalExtentEmpty` exception is thrown.\n\nThe specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html).",
"schema": {
"type": "array",
"subtype": "temporal-intervals",
Expand All @@ -38,24 +38,20 @@
{
"type": "string",
"format": "date-time",
"subtype": "date-time"
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date"
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "string",
"format": "time",
"subtype": "time"
},
{
"type": "string",
"subtype": "year",
"minLength": 4,
"maxLength": 4,
"pattern": "^\\d{4}$"
"subtype": "time",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"description": "Time only, formatted as `HH:MM:SS`. The time zone is UTC."
},
{
"type": "null"
Expand Down Expand Up @@ -85,7 +81,7 @@
],
[
"12:00:00Z",
null
"00:00:00Z"
]
]
]
Expand Down
11 changes: 4 additions & 7 deletions climatological_normal.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,13 @@
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string",
"subtype": "year",
"minLength": 4,
"maxLength": 4,
"pattern": "^\\d{4}$"
"type": "integer",
"subtype": "year"
}
},
"default": [
"1981",
"2010"
1981,
2010
],
"optional": true
}
Expand Down
13 changes: 4 additions & 9 deletions filter_temporal.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@
{
"type": "string",
"format": "date-time",
"subtype": "date-time"
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date"
},
{
"type": "string",
"subtype": "year",
"minLength": 4,
"maxLength": 4,
"pattern": "^\\d{4}$"
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "null"
Expand Down
13 changes: 4 additions & 9 deletions load_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,14 @@
{
"type": "string",
"format": "date-time",
"subtype": "date-time"
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date"
},
{
"type": "string",
"subtype": "year",
"minLength": 4,
"maxLength": 4,
"pattern": "^\\d{4}$"
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "null"
Expand Down
15 changes: 6 additions & 9 deletions meta/subtype-schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"subtype": "date",
"format": "date",
"title": "Date only",
"description": "Date only representation, as defined for `full-date` by [RFC 3339 in section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). The time zone is UTC."
"description": "Date only representation, as defined for `full-date` by [RFC 3339 in section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). The time zone is UTC. Missing time components are all 0."
},
"date-time": {
"type": "string",
Expand Down Expand Up @@ -282,7 +282,7 @@
"type": "array",
"subtype": "temporal-interval",
"title": "Single temporal interval",
"description": "Left-closed temporal interval, represented as two-element array with the following elements:\n\n1. The first element is the start of the temporal interval. The specified time instant is **included** in the interval.\n2. The second element is the end of the temporal interval. The specified time instant is **excluded** from the interval.\n\nThe specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html). `null` can be used to specify unbounded intervals.",
"description": "Left-closed temporal interval, represented as two-element array with the following elements:\n\n1. The first element is the start of the temporal interval. The specified time instant is **included** in the interval.\n2. The second element is the end of the temporal interval. The specified time instant is **excluded** from the interval.\n\nThe second element must always be greater/later than the first element. Otherwise, an exception is thrown.\n\nThe specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html). Also supports unbounded intervals by setting one of the boundaries to `null`, but never both.",
"uniqueItems": true,
"minItems": 2,
"maxItems": 2,
Expand Down Expand Up @@ -370,9 +370,9 @@
"time": {
"type": "string",
"subtype": "time",
"format": "time",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"title": "Time only",
"description": "Time only representation, as defined for `full-time` by [RFC 3339 in section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6)."
"description": "Time only representation, as defined for `partial-time` by [RFC 3339 in section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). The time zone is UTC."
},
"udf-code": {
"type": "string",
Expand Down Expand Up @@ -414,13 +414,10 @@
"description": "Specifies details about cartographic projections as WKT2 string. Refers to the latest WKT2 version (currently [WKT2:2018](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) / ISO 19162:2018) unless otherwise stated by the process."
},
"year": {
"type": "string",
"type": "integer",
"subtype": "year",
"minLength": 4,
"maxLength": 4,
"pattern": "^\\d{4}$",
"title": "Year only",
"description": "Year representation, as defined for `date-fullyear` by [RFC 3339 in section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6)."
"description": "Year as integer, can be any number of digits and can be negative."
}
}
}
5 changes: 0 additions & 5 deletions order.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
"type": "string",
"format": "date",
"subtype": "date"
},
{
"type": "string",
"format": "time",
"subtype": "time"
}
]
}
Expand Down
112 changes: 112 additions & 0 deletions proposals/date_between.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"id": "date_between",
"summary": "Between comparison for dates and times",
"description": "By default, this process checks whether `x` is later than or equal to `min` and before or equal to `max`.\n\nIf `exclude_max` is set to `true` the upper bound is excluded so that the process checks whether `x` is later than or equal to `min` and before `max`.\n\nLower and upper bounds are not allowed to be swapped. So `min` MUST be before or equal to `max` or otherwise the process always returns `false`.",
"categories": [
"comparison",
"date & time"
],
"experimental": true,
"parameters": [
{
"name": "x",
"description": "The value to check.",
"schema": [
{
"type": "string",
"format": "date-time",
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "string",
"subtype": "time",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"description": "Time only, formatted as HH:MM:SS. The time zone is UTC."
}
]
},
{
"name": "min",
"description": "Lower boundary (inclusive) to check against.",
"schema": [
{
"type": "string",
"format": "date-time",
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "string",
"subtype": "time",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"description": "Time only, formatted as HH:MM:SS. The time zone is UTC."
}
]
},
{
"name": "max",
"description": "Upper boundary (inclusive) to check against.",
"schema": [
{
"type": "string",
"format": "date-time",
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "string",
"subtype": "time",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"description": "Time only, formatted as HH:MM:SS. The time zone is UTC."
}
]
},
{
"name": "exclude_max",
"description": "Exclude the upper boundary `max` if set to `true`. Defaults to `false`.",
"schema": {
"type": "boolean"
},
"default": false,
"optional": true
}
],
"returns": {
"description": "`true` if `x` is between the specified bounds, otherwise `false`.",
"schema": {
"type": [
"boolean",
"null"
]
}
},
"examples": [
{
"arguments": {
"x": "2020-01-01",
"min": "2021-01-01",
"max": "2022-01-01"
},
"returns": false
}
]
}
13 changes: 4 additions & 9 deletions proposals/load_stac.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,14 @@
{
"type": "string",
"format": "date-time",
"subtype": "date-time"
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date"
},
{
"type": "string",
"subtype": "year",
"minLength": 4,
"maxLength": 4,
"pattern": "^\\d{4}$"
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "null"
Expand Down
Loading

0 comments on commit 4b92981

Please sign in to comment.