Quality Element Group Requirements Class: Basic Types and Simple Components Schemas Requirements Class
OGC 08-094r1 SWE Common Data Model
This group allows the use of some of the XML elements define above to add qualitative information to a simple data component. The following examples illustrate how this is
done in a SWE Common XML instance.
This first example shows that quality is expressed by wrapping the value in one of the data components defined previously that is appropriate for the desired representation.
Here a “Quantity” element is used to specify a decimal value representing relative accuracy:
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0sciUncertainty.owlAccuracy
swe:label Relative Accuracy
swe:label swe:uom
code =
swe:value 5
swe:value swe:Quantity
This snippet is then inserted within the data component element whose value’s quality needs to be expressed. This is shown below:
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0physDynamics.owlVelocity
swe:label Velocity
swe:label swe:description
Linear velocity of the vehicle swe:description
swe:quality swe:Quantity
definition =
http:sweet.jpl.nasa.gov2.0sciUncertainty.owlAccuracy swe:label
Relative Accuracy swe:label
swe:uom code
= swe:value
5 swe:value
swe:Quantity swe:quality
swe:uom code
= ms
swe:value 23.5
swe:value swe:Quantity
This example is a velocity measurement of 23.5 meters per seconds, with a relative accuracy of 5. Absolute accuracy could have been specified as well by using a different
definition URI and setting the unit of the accuracy value to “ms”.
Bidirectional tolerance is a measure of quality that is often used for specification of mechanical parts. Such a use case is shown below:
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0spaceExtent.owlThickness
swe:label Thickness
swe:label swe:description
Thickness measured by the sheet metal gauge swe:description
swe:quality swe:QuantityRange
definition =
http:sweet.jpl.nasa.gov2.0sciUncertainty.owlTolerance swe:label
Dimensional Tolerance swe:label
swe:uom code
= um
swe:value -20 +0
swe:value swe:QuantityRange
swe:quality swe:uom
code =
mm swe:value
5.6 swe:value
swe:Quantity
In the previous example, the sheet of metal is measured to have a thickness between 5.58 and 5.6 millimeters. Note that a different unit i.e. micrometer is used for the tolerance
value.
82
Copyright © 2011 Open Geospatial Consortium
SWE Common Data Model OGC 08-094r1
The following example shows the use of a categorical representation of quality in order to implement a passfail quality control flag as defined in the MMI Marine Metadata
Interoperability ontology:
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0physPressure.owlPressure
swe:label Water Pressure
swe:label swe:description
Water pressure measured by CTD swe:description
swe:quality swe:Category
definition =
http:mmisw.orgontq2otestpointsGoodTest swe:label
QC Flag swe:label
swe:codeSpace xlink:href
= http:mmisw.orgontq2oflag
swe:value fail
swe:value swe:Category
swe:quality swe:uom
code =
dbar swe:value
1084 swe:value
swe:Quantity
All previous examples show how quality can be given along with the inline value. However this standard allows specifying quality in a data descriptor, which means that
the qualitative information applies to all data values represented by the component in a separately encoded data stream. This is just achieved by using the component with no
inline values.
Additionally the quality value can be given in the encoded data stream along with the measurement values when the quality component is defined itself as a field of the dataset.
This is shown in clause 7.5.3 describing the “DataStream” element.
The “quality” property element should never be used recursively by an implementation i.e. This property should not be used within a data component that is himself used as an
instance of the “Quality” group. Indeed, although it is theoretically acceptable to describe the quality of the qualitative information itself, it is a practice that would greatly
complexify the analysis of such metadata and is thus strongly discouraged.