SWE Common Data Model OGC 08-094r1
element name
= Matrix
type =
swe:MatrixType substitutionGroup
= swe:AbstractDataComponent
complexType name
= MatrixType
complexContent extension
base =
swe:AbstractDataComponentType sequence
element name
= elementCount
type =
swe:CountPropertyType element
name =
elementType complexType
complexContent extension
base =
swe:AbstractDataComponentPropertyType attribute
name =
name type
= NCName
use =
required extension
complexContent complexType
element element
name =
encoding minOccurs
= complexType
sequence element
ref =
swe:AbstractEncoding sequence
complexType element
element name
= values
type =
swe:EncodedValuesPropertyType minOccurs
= sequence
attribute name
= referenceFrame
type =
anyURI use
= required
attribute name
= localFrame
type =
anyURI use
= optional
extension complexContent
complexType
The “Matrix” element is a special case of “DataArray” that adds “referenceFrame” and “localFrame” attributes for expressing the array components in a well defined reference
frame. As opposed to the “Vector” component, the axis order is implied in a matrix because it is difficult to assign a frame axis to each individual element of an N-
dimensional array. The array index in each dimension is thus used as the axis index in the ordered list provided by the reference frame. The following example shows how to
encode a rotation matrix:
swe:Matrix definition
= http:sweet.jpl.nasa.gov2.0spaceDirection.owlOrientation
referenceFrame =
http:www.opengis.netdefcrsOGC0ECI_WGS84 swe:elementCount
swe:Count swe:value
3 swe:value
swe:Count swe:elementCount
swe:elementType name
= row
swe:Matrix definition
= http:sweet.jpl.nasa.gov2.0info.owlRow
swe:elementCount swe:Count
swe:value 3
swe:value swe:Count
swe:elementCount swe:elementType
name =
coef swe:Quantity
definition =
http:sweet.jpl.nasa.gov2.0mathVector.owlCoordinate swe:uom
code =
1 swe:Quantity
swe:elementType swe:Matrix
swe:elementType swe:encoding
swe:TextEncoding blockSeparator
= tokenSeparator
= ,
swe:encoding swe:values
0.36,0.48,-0.8 -0.8,0.6,0 0.48,0.64,0.6 swe:values
swe:Matrix
Copyright © 2011 Open Geospatial Consortium
101
OGC 08-094r1 SWE Common Data Model
This example defines a 3x3 rotation matrix whose elements are expressed in the ECI coordinate reference system. It corresponds to the following matrix:
Axes are assumed to be in the same order as specified in the reference frame definition, that is to say: 1
st
rowcolumn = X, 2
nd
rowcolumn = Y, 3
rd
rowcolumn = Z As with the “Vector” element, the “localFrame” attribute can be used to identify the
frame of whose positioning information is specified by the matrix
8.4.3 DataStream Element
The “DataStream” element is the XML schema implementation of the “DataStream” UML class defined in clause 7.5.3. The schema snippet for this element and its
corresponding complex type is shown below:
element name
= DataStream
type =
swe:DataStreamType substitutionGroup
= swe:AbstractSWEIdentifiable
complexType name
= DataStreamType
complexContent extension
base =
swe:AbstractSWEIdentifiableType sequence
element name
= elementCount
minOccurs =
complexType sequence
element ref
= swe:Count
sequence complexType
element element
name =
elementType complexType
complexContent extension
base =
swe:AbstractDataComponentPropertyType attribute
name =
name type
= NCName
use =
required extension
complexContent complexType
element element
name =
encoding complexType
sequence element
ref =
swe:AbstractEncoding sequence
complexType element
element name
= values
type =
swe:EncodedValuesPropertyType sequence
extension complexContent
complexType
This element is used to describe a data stream as a list of elements whose type is given by the element type. It is similar to a “DataArray” but the “elementCount” property is
optional as the total number of elements composing the stream does not have to be specified. This is useful in particular to describe never-ending streams such as the ones
used for delivering real time sensor data. Additionally, the “DataStream” element is not a
102
Copyright © 2011 Open Geospatial Consortium
SWE Common Data Model OGC 08-094r1
data component and thus cannot be nested into other aggregates. It can only serve as a root object to represent the data stream as a whole.
The next example shows how it is used to describe a real time stream of aircraft navigaton data:
swe:DataStream swe:label
Aircraft Navigation swe:label
swe:elementType name
= navData
swe:DataRecord swe:field
name =
time swe:Time
definition =
http:www.opengis.netdefpropertyOGC0SamplingTime referenceFrame
= http:www.opengis.netdeftrsOGC0GPS
referenceTime =
1970-01-01T00:00:00Z swe:uom
code =
s swe:Time
swe:field swe:field
name =
location swe:Vector
definition =
http:www.opengis.netdefpropertyOGC0PlatformLocation referenceFrame
= http:www.opengis.netdefcrsEPSG04979
swe:coordinate name
= lat
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0spaceCoordinates.owlLatitude
axisID =
Lat swe:uom
code =
deg swe:Quantity
swe:coordinate swe:coordinate
name =
lon swe:Quantity
definition =
http:sweet.jpl.nasa.gov2.0spaceCoordinates.owlLongitude axisID
= Long
swe:uom code
= deg
swe:Quantity swe:coordinate
swe:coordinate name
= alt
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0spaceExtent.owlAltitude
axisID =
h swe:uom
code =
m swe:Quantity
swe:coordinate swe:Vector
swe:field swe:field
name =
attitude swe:Vector
definition =
http:www.opengis.netdefpropertyOGC0PlatformOrientation referenceFrame
= http:www.opengis.netdefcrsOGC0ENU
swe:coordinate name
= heading
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0spaceCoordinates.owlYaw
axisID =Z
swe:uom code
= deg
swe:Quantity swe:coordinate
swe:coordinate name
= pitch
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0spaceCoordinates.owlPitch
axisID =X
swe:uom code
= deg
swe:Quantity swe:coordinate
swe:coordinate name
= roll
swe:Quantity definition
= http:sweet.jpl.nasa.gov2.0spaceCoordinates.owlRoll
axisID =Y
swe:uom code
= deg
swe:Quantity swe:coordinate
swe:Vector swe:field
swe:DataRecord swe:elementType
swe:encoding swe:TextEncoding
tokenSeparator =
, blockSeparator
= 10;
decimalSeparator =
. swe:encoding
swe:values xlink:href
= rtp:myserver:4563navData
swe:DataStream
Copyright © 2011 Open Geospatial Consortium
103