Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for data masks #470

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
====
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.
====
Original file line number Diff line number Diff line change
Expand Up @@ -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
130 changes: 130 additions & 0 deletions core/standard/openapi/schemas/collections/detailedCollection.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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]
]
48 changes: 48 additions & 0 deletions core/standard/requirements/edr/REQ_rc-parameters-data-mask.adoc
Original file line number Diff line number Diff line change
@@ -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.

====
17 changes: 15 additions & 2 deletions core/standard/sections/annex_collection_response.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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** | <<col-links,Link>> object|**Yes**| Array of height values supported by the collection.
|**link** | <<col-links,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.
Expand Down Expand Up @@ -356,6 +356,7 @@ a set of key-value pairs, where the key is the name of the parameter and the val
|**observedProperty** |<<col-observed_property,observedProperty>> object|**Yes**| A formal definition of the parameter
|extent |<<col-extent,Extent>> object|No| Information on the spatio-temporal extent of the parameter values (if different from other parameters in the collection)
|measurementType |<<col-measurement_type,measurementType>> object|No| Information on how the value was derived
|dataMask |<<col-dataMask,DataMask>> object|No| Optional object for describing where data value availablity (1) and where its not (0).

|==========================

Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -481,7 +495,6 @@ A Parameter names example is shown below.
"period": "PT0S"
}
}
}
}

----
25 changes: 18 additions & 7 deletions core/standard/sections/annex_requirements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]

Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Loading