SWE Common Data Model OGC 08-094r1
9.1.3 Rules for DataRecord and Vector
Both “DataRecord” and “Vector” components are aggregates consisting of an ordered sequence of child components. The values contained in these aggregates are encoded by
successively encoding each child component in the order in which they are listed in the XML description and including the resulting values sequentially in the stream.
The definition of a “DataRecord” “Vector” structure composed of N fields coordinates can be represented in the following way:
... Definition
of Field N Definition
of Field 2 Definition
of Field 1 DataRecord definition
The data block corresponding to such a structure would sequentially include all values for field 1, then all values for field 2, etc. until the last field is reached. Each field may
consist of a single value if it is a scalar but may also consist of multiple values if it is itself an aggregate or a range component.
Requirement
http:www.opengis.netspecSWE2.0reqgeneral-encoding-rulesrecord-encoding-rule
Req 86. “DataRecord” fields or “Vector” coordinates shall be encoded sequentially
in a data block in the order in which these fields or coordinates are listed in the data
descriptor.
9.1.4 Rules for DataChoice
The “DataChoice” is an aggregate consisting of a choice of several child components called items. When values of a data choice are encoded, the resulting data block consists
of two things: A token identifying the selecting item and the item values themselves. Only values of a single item can be encoded in each instance of a choice.
... Definition
of Item N Definition
of Item 2 Definition
of Item 1 DataChoice definition
The data block corresponding to such a structure would then sequentially include the item identifier i.e. the choice value and then the values for the selected item. The item may
consist of a single value if it is a scalar or multiple values if it is itself an aggregate or a range component.
Copyright © 2011 Open Geospatial Consortium
117
OGC 08-094r1 SWE Common Data Model
Requirement
http:www.opengis.netspecSWE2.0reqgeneral-encoding-ruleschoice-encoding-rule
Req 87. Encoded values for the selected item of a “DataChoice” shall be provided
along with information that unambiguously identifies the selected item.
9.1.5 Rules for DataArray and Matrix
The “DataArray” is an aggregate consisting of a number of repeated elements, all of the same type as defined by the element type. Values contained by a “DataArray” are
encoded by sequentially including the values of each element.
The definition of a “DataArray” “Matrix” structure composed of the array dimension and size and the element type definition. This can be represented in the following way:
Definition of Array Element
Definition of Array Dimension
DataArray definition
The data block corresponding to such a structure would sequentially include the number representing the array size only if it is variable followed by one or more values
corresponding to each array element. The number of values encoded for each element depends only on the array element definition, and the total number of values also depends
on the array size.
Requirement
http:www.opengis.netspecSWE2.0reqgeneral-encoding-rulesarray-encoding-rule
Req 88. “DataArray” elements shall be encoded sequentially in a data block in the
order of their index in the array i.e. from low to high index.
Requirement
http:www.opengis.netspecSWE2.0reqgeneral-encoding-rulesarray-size-encoding-rule
Req 89. Encoded data for a variable size “DataArray” shall include a number
specifying the array size whatever the encoding method used.
118
Copyright © 2011 Open Geospatial Consortium