SWE Common Data Model OGC 08-094r1
Allow edValues
«property» + value: Real [0..]
+ interval: RealPair
[0..] + significantFigures:
Integer [0..1]
Figure 7.21 – AllowedValues Class
This class allows constraints to be defined either by enumerating a list of allowed values andor a list of inclusive intervals. To be valid, the value must either be one of the
enumerated values or included in one of the intervals. The numbers used in the “value” and “interval” properties shall be expressed in the same unit as the parent data
component.
Requirement
http:www.opengis.netspecSWE2.0requml-simple-componentsallowed-values-unit-coherent
Req 36. The scale of the numbers used in the “enumeration” and “interval”
properties of an instance of the “AllowedValues” class shall be expressed in the
same scale as the values that the constraint applies to.
If the parent data component instance is used to define a projected quantity i.e. when the “axisID” is set, then the constraints given by this class are expressed along the same
spatial reference frame axis.
The number of significant digits can also be specified with the “significantFigures” property though it is only applicable when used with a decimal representation i.e. within
the “Quantity” class. This limits the total number of digits that can be included in the number represented whether a scientific notation is used or not.
Examples
All non-zero digits are considered significant. 123.45 has five significant figures: 1, 2, 3, 4 and 5 Zeros between two non-zero digits are significant. 101.12 has five significant figures: 1, 0, 1, 1 and 2
Leading zeros are not significant. 0.00052 has two significant figures: 5 and 2 and is equivalent to 5.2x10
-4
and would be valid even if the number of significant figures is restricted to 2.
Trailing zeros are significant. 12.2300 has six significant figures: 1, 2, 2, 3, 0 and 0 and would thus be invalid if the number of significant figures is restricted to 4.
Note: The number of significant figures andor an interval constraint i.e. minmax values can help a software implementation choosing the best data type to use i.e. ‘float’
or ‘double’, ‘short’, ‘int’ or ‘long’ to store values associated to a given data component.
Copyright © 2011 Open Geospatial Consortium
41
OGC 08-094r1 SWE Common Data Model
7.2.19 AllowedTimes Class
The “AllowedTimes” class is used to express constraints on the value of a data component represented by a “Time” class. The UML class is shown below:
Allow edTimes
«property» + value: TM_Position [0..]
+ interval: TimePair [0..] + significantFigures:
Integer [0..1]
Figure 7.22 – AllowedTimes Class
This class is almost identical to the “AllowedValues” class and in fact all properties are used in the same way. The only difference with this class is that the “value” and
“interval” properties allow the use of time data types as defined in clause 7.2.1.
The constraints given by this class are expressed along the same time reference frame axis as the value attached to the parent data component.
7.2.20 Unions of simple component classes
Several useful groups of classes are also defined in this package. These unions can be used as attribute types and they are shown on the following diagram:
«Union»
AnyNumerical
«property» «Union»
AnyScalar
«Union»
AnyRange
«property» «property»
+ byBoolean: Boolean
+ byCount: Count
+ byQuantity: Quantity
+ byTime: Time + byCategory: Category
+ byText: Text + byCount: Count
+ byQuantity: Quantity + byTime:
Time + byQuantityRange:
QuantityRange + byTimeRange: TimeRange
+ byCountRange: CountRange
+ byCategoryRange: CategoryRange
Figure 7.23 – Simple component unions
The “AnyScalar” union groups all classes representing scalar components, numerical or not. The “AnyNumerical” union includes all classes corresponding to numerical scalar
representations. The “AnyRange” union regroups all range components.
42
Copyright © 2011 Open Geospatial Consortium
SWE Common Data Model OGC 08-094r1
7.3 Requirements Class: Record Components Package Requirements Class
http:www.opengis.netspecSWE2.0requml-record-components
Target Type Software Implementation or Encoding of the Conceptual Models
Dependency
http:www.opengis.netspecSWE2.0requml-simple-components
As detailed in the following clauses, this package defines classes modeling record style component types that can be nested to build complex structures from the simple
component types introduced in 7.2.
Requirement
http:www.opengis.netspecSWE2.0requml-record-componentsdependency-simple-components
Req 37. An encoding or software passing the “Record Components UML Package”
conformance test class shall first pass the “Basic Types and Simple Components UML
Packages” conformance test class.
The classes defined in this package are “DataRecord” and “Vector” other aggregates are defines in the “Choice Components” and “Block Components” packages defined in
clauses 7.4 and 7.5 respectively. The UML model is exposed below:
AbstractSWEIdentifiable «Type»
Simple Components:: AbstractDataComponent
«property» + definition: ScopedName [0..1]
+ optional: Boolean [0..1] = false + updatable: Boolean [0..1]
«Type»
DataRecord
«Type»
Vector
«property» «property»
+ field: AbstractDataComponent [1..] + referenceFrame:
SC_CRS + localFrame: SC_CRS [0..1]
+ coordinate: AnyNumerical [1..]
Figure 7.24 – Record Data Components
Copyright © 2011 Open Geospatial Consortium
43