From 0b943eda1a1be51c763de1d1a50296a351d824b1 Mon Sep 17 00:00:00 2001 From: m-burgoyne Date: Thu, 9 Nov 2023 13:11:18 +0000 Subject: [PATCH 1/7] Add tests for data mask attribute --- .../abstract_tests/collections/ATS_rc-parameters.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/standard/abstract_tests/collections/ATS_rc-parameters.adoc b/core/standard/abstract_tests/collections/ATS_rc-parameters.adoc index 60fb9e672..413bcae1b 100644 --- a/core/standard/abstract_tests/collections/ATS_rc-parameters.adoc +++ b/core/standard/abstract_tests/collections/ATS_rc-parameters.adoc @@ -12,4 +12,6 @@ step::: Verify that each parameter property has a `type` property. step::: Verify that each parameter property has an `observedProperty` property. step::: Verify that the `observedProperty` property has a `label` property with correctly defined i18n compliant values. step::: Verify that the `observedProperty` property has an `id` property. -==== \ No newline at end of file +step::: Verify that in a `/collections/` request parameter propreties DO NOT have a `dataMask` attribute. +step::: Verify that IF the parameter propreties in a `/collections/{collectionId}` response have a `dataMask` attribute, the mask values provide an accurate representation of data availability. +==== From c199844e4a58924fda79a4009a053b0dbd8bb40b Mon Sep 17 00:00:00 2001 From: m-burgoyne Date: Thu, 9 Nov 2023 13:13:35 +0000 Subject: [PATCH 2/7] Create parameterNamesDataMask.yaml --- .../collections/parameterNamesDataMask.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 core/standard/openapi/schemas/collections/parameterNamesDataMask.yaml diff --git a/core/standard/openapi/schemas/collections/parameterNamesDataMask.yaml b/core/standard/openapi/schemas/collections/parameterNamesDataMask.yaml new file mode 100644 index 000000000..2ee522e84 --- /dev/null +++ b/core/standard/openapi/schemas/collections/parameterNamesDataMask.yaml @@ -0,0 +1,56 @@ +allOf: + - $ref: parameterNames.yaml +properties: + dataMask: + type: object + description: Optional object for describing where data is available (1) and where its not (0). + required: + - order + - mask + properties: + order: + description: The order of the axes as they appear in the mask + type: array + items: + type: string + mask: + description: A multidimensional array describing where data is available (1) and where its not (0). + type: array + items: + type: array + items: + type: integer + minimum: 0 + maximum: 1 +example: + type: Parameter + id: mslp + description: Air pressure at sea level + unit: + label: Pascals + symbol: + value: "Pa" + type: https://qudt.org/vocab/unit/PA + observedProperty: + id: http://codes.wmo.int/grib2/codeflag/4.2/_0-3-1 + label: MSL Pressure + measurementType: + method: instantaneous + period: PT0M + dataMask: + order: ["temporal","vertical"] + mask: [ + [1,1,1,1,1,1,1,1,1,1], + [1,1,1,1,1,1,1,1,1,1], + [1,1,0,0,0,0,1,1,1,1], + [1,1,1,1,1,1,1,1,1,1], + [1,1,1,1,1,0,0,0,0,1], + [1,1,1,1,1,1,1,1,1,1], + [1,1,0,1,1,0,1,1,1,1], + [1,1,1,1,1,1,1,1,1,1], + [1,1,1,1,1,1,1,0,1,1], + [1,1,1,0,1,1,1,1,1,1], + [1,1,1,1,1,1,1,1,1,1], + [1,1,1,1,1,0,0,0,1,1], + [1,1,1,1,1,1,1,1,1,1] + ] From b5c7f2f3dee8ef7ef5add67aa88aaecb67b92297 Mon Sep 17 00:00:00 2001 From: m-burgoyne Date: Thu, 9 Nov 2023 13:14:25 +0000 Subject: [PATCH 3/7] Create detailedCollection.yaml --- .../collections/detailedCollection.yaml | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 core/standard/openapi/schemas/collections/detailedCollection.yaml diff --git a/core/standard/openapi/schemas/collections/detailedCollection.yaml b/core/standard/openapi/schemas/collections/detailedCollection.yaml new file mode 100644 index 000000000..fb6785019 --- /dev/null +++ b/core/standard/openapi/schemas/collections/detailedCollection.yaml @@ -0,0 +1,130 @@ +type: object +description: Collection with optional data mask information +required: + - links + - id + - extent + - data_queries + - parameter_names + - output_formats + - crs +properties: + links: + type: array + items: + $ref: ../core/link.yaml + example: + - href: https://example.org/service/description.html + hreflang: en + rel: service-doc + type: text/html + title: "" + - href: https://example.org/service/licence.html + hreflang: en + rel: licence + type: text/html + title: "" + - href: https://example.org/service/terms-and-conditions.html + hreflang: en + rel: restrictions + type: text/html + title: "" + - href: https://example.org/edr/collections/the_collection_id/ + hreflang: en + rel: collection + type: collection + title: Collection + - href: https://example.org/edr/collections/the_collection_id/position + hreflang: en + rel: data + type: position + title: Position + - href: https://example.org/edr/collections/the_collection_id/area + hreflang: en + rel: data + type: area + title: Area + id: + description: id of the collection + type: string + example: Metar data + title: + description: title of the collection + type: string + example: Metar observations + description: + description: description of the collection + type: string + example: Last 24 hours Metar observations + keywords: + description: List of keywords which help to describe the collection + type: array + items: + type: string + extent: + $ref: extent.yaml + data_queries: + description: Detailed information relevant to individual query types + type: object + properties: + position: + type: object + properties: + link: + $ref: positionLink.yaml + radius: + type: object + properties: + link: + $ref: radiusLink.yaml + area: + type: object + properties: + link: + $ref: areaLink.yaml + cube: + type: object + properties: + link: + $ref: cubeLink.yaml + trajectory: + type: object + properties: + link: + $ref: trajectoryLink.yaml + corridor: + type: object + properties: + link: + $ref: corridorLink.yaml + locations: + type: object + properties: + link: + $ref: locationsLink.yaml + items: + type: object + properties: + link: + $ref: itemsLink.yaml + crs: + description: list of the coordinate reference systems the collection results can support + type: array + items: + type: string + output_formats: + description: list of formats the results can be presented in + type: array + items: + type: string + example: + - CoverageJSON + - GeoJSON + - IWXXM + - GRIB + parameter_names: + description: list of the data parameters available in the collection + type: object + additionalProperties: + items: + $ref: parameterNamesDataMask.yaml From f9151aa1bd7a9ca3cf75ce5881ace25a0a6ba6e0 Mon Sep 17 00:00:00 2001 From: m-burgoyne Date: Thu, 9 Nov 2023 13:15:23 +0000 Subject: [PATCH 4/7] Change to refer to detailedCollection.yaml --- core/standard/openapi/responses/collections/collection.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/standard/openapi/responses/collections/collection.yaml b/core/standard/openapi/responses/collections/collection.yaml index 59d2f76e1..7141a9011 100644 --- a/core/standard/openapi/responses/collections/collection.yaml +++ b/core/standard/openapi/responses/collections/collection.yaml @@ -2,7 +2,7 @@ description: Metadata about the {collectionId} collection shared by this API content: application/json: schema: - $ref: ../../schemas/collections/collection.yaml + $ref: ../../schemas/collections/detailedCollection.yaml text/html: schema: type: string From 395ca9c5d20555825a5f05db0c8e6de76b458655 Mon Sep 17 00:00:00 2001 From: m-burgoyne Date: Thu, 9 Nov 2023 13:16:59 +0000 Subject: [PATCH 5/7] Update to add dataMask attribute --- .../sections/annex_collection_response.adoc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/core/standard/sections/annex_collection_response.adoc b/core/standard/sections/annex_collection_response.adoc index f8dc78c9c..7e805da05 100644 --- a/core/standard/sections/annex_collection_response.adoc +++ b/core/standard/sections/annex_collection_response.adoc @@ -263,7 +263,7 @@ The EDR query object provides the metadata for the specified query type. .EDR Query Object |========================== |Field Name|Type|Required|Description -|**link** | <> object|**Yes**| Array of height values supported by the collection. +|**link** | <> object|**Yes**| Link to the data query. |========================== A data query object example for a collection that supports Position and Radius queries is shown below. @@ -356,6 +356,7 @@ a set of key-value pairs, where the key is the name of the parameter and the val |**observedProperty** |<> object|**Yes**| A formal definition of the parameter |extent |<> object|No| Information on the spatio-temporal extent of the parameter values (if different from other parameters in the collection) |measurementType |<> object|No| Information on how the value was derived +|dataMask |<> object|No| Optional object for describing where data value availablity (1) and where its not (0). |========================== @@ -418,6 +419,19 @@ The measurementType object provides basic information about how the parameter is |========================== +[[col-dataMask]] +=== DataMask Object +The dataMask object provides the information to discover data value availabilty. + +[width="100%",cols="22%,22%,14%,42%",frame="topbot",options="header"] +.Unit Object +|========================== +|Field Name|Type|Required|Description +|**order** | String|**Yes**| Array of dimension names in the order of the values in the mask array +|**mask** | Array |**Yes**| Array of values indicating if the data is available (1) or missing (0) +|========================== + + A Parameter names example is shown below. [source,json] @@ -481,7 +495,6 @@ A Parameter names example is shown below. "period": "PT0S" } } - } } ---- From ead4f62b291ca394e37675646954ab1688f87022 Mon Sep 17 00:00:00 2001 From: m-burgoyne Date: Thu, 9 Nov 2023 13:19:27 +0000 Subject: [PATCH 6/7] Update for daskMask Split out the /collections/{collectionId} response from the /collections to add support for optional dataMask information in the /collections/{collectionId} response --- .../standard/sections/annex_requirements.adoc | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/core/standard/sections/annex_requirements.adoc b/core/standard/sections/annex_requirements.adoc index 06643ba1f..e74e50539 100644 --- a/core/standard/sections/annex_requirements.adoc +++ b/core/standard/sections/annex_requirements.adoc @@ -49,11 +49,6 @@ include::../requirements/collections/REQ_rc-md-op.adoc[] include::../requirements/collections/REQ_rc-md-success.adoc[] -include::../requirements/collections/REQ_src-md-op.adoc[] - -include::../requirements/collections/REQ_src-md-success.adoc[] - - include::../requirements/edr/REQ_rc-collection-info.adoc[] @@ -77,14 +72,27 @@ include::../requirements/core/REQ_rc-extent.adoc[] include::../requirements/edr/REQ_rc-md-query-links.adoc[] - - include::../requirements/edr/REQ_rc-crs.adoc[] include::../requirements/edr/REQ_rc-parameters.adoc[] :sectnums: +=== Requirements Class "Collection" in Detail + +:sectnums: + +==== *Requirements Class:* Collection + +include::../requirements/requirements_class_collection.adoc[] + +include::../requirements/collections/REQ_src-md-op.adoc[] + +include::../requirements/collections/REQ_src-md-success.adoc[] + +include::../requirements/edr/REQ_rc-parameters-data-mask.adoc[] + +:sectnums: === Requirements Class "Queries" for Position, Area, Cube, Trajectory, Corridor, Items, Locations, and Instances @@ -156,6 +164,9 @@ include::../requirements/edr/REQ_rc-items.adoc[] :sectnums: + +include::../requirements/edr/REQ_rc-locationid-definition.adoc[] +include::../requirements/edr/REQ_rc-locationid-response.adoc[] include::../requirements/edr/REQ_rc-locations.adoc[] :sectnums: From ae1a6c2c7f56e80d32269b43fe83e2541f84db52 Mon Sep 17 00:00:00 2001 From: m-burgoyne Date: Thu, 9 Nov 2023 13:21:33 +0000 Subject: [PATCH 7/7] Create REQ_rc-parameters-data-mask.adoc Create a requirement for the parameters definition in /collections/{collectionId} to support optional dataMask information --- .../edr/REQ_rc-parameters-data-mask.adoc | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 core/standard/requirements/edr/REQ_rc-parameters-data-mask.adoc diff --git a/core/standard/requirements/edr/REQ_rc-parameters-data-mask.adoc b/core/standard/requirements/edr/REQ_rc-parameters-data-mask.adoc new file mode 100644 index 000000000..5317357bc --- /dev/null +++ b/core/standard/requirements/edr/REQ_rc-parameters-data-mask.adoc @@ -0,0 +1,48 @@ + +[[req_edr_rc-parameters-with-data-mask]] + +[requirement] +==== +[%metadata] +identifier:: /req/edr/rc-parameters-with-data-mask + +*A:* + +A parameter object MAY have any number of members (name/value pairs). + +--- +*B:* + +A parameter object SHALL have a member with the name "type" and the value "Parameter". + +--- +*C:* + +A parameter object MAY have a member with the name "id" where the value SHALL be a string and SHOULD be a common identifier. + +--- +*D:* + +A parameter object MAY have a member with the name "label" where the value SHALL be a string that is the name of the parameter and which SHOULD be short. Note that this SHOULD be left out if it would be identical to the "label" of the "observedProperty" member. + +--- +*E:* + +A parameter object MAY have a member with the name "description" where the value SHALL be a string which is a, perhaps lengthy, textual description of the parameter. + +--- +*F:* + +A parameter object SHALL have a member with the name "observedProperty" where the value is an object which SHALL have the members "label" and "id" and which MAY have the members "description". The value of "label" SHALL be a string which is the name of the observed property and which SHOULD be short. The value of "id" SHALL be a string and SHOULD be a common identifier. If given, the value of "description" SHALL be a string with a textual description of the observed property. + +--- +*G:* + +A parameter object MAY have a member with the name "unit" where the value is an object which SHALL have either or both the members "label" or/and “symbol”, and which MAY have the member "id". If given, the value of "symbol" SHALL either be a string of the symbolic notation of the unit, or an object with the members "value" and "type" where "value" is the symbolic unit notation and "type" references the unit serialization scheme that is used. "type" SHALL HAVE the value "http://www.opengis.net/def/uom/UCUM/” if UCUM is used, or a custom value as recommended in section “Extensions”. If given, the value of "label" SHALL be a string of the name of the unit and SHOULD be short. If given, the value of "id" SHALL be a string and SHOULD be a common identifier. It is RECOMMENDED to reference a unit serialization scheme to allow automatic unit conversion. + +--- +*H:* + +A parameter object MAY have a member with the name "dataMask" where the value is an object which SHALL have the members "order" and “mask”. The value of "order" SHALL either be an array of strings such that each string is the name of the cooresponding dimension. Within the mask arrays the elements are provide such that the last name in the "order" array varies fastest. + +====