DataRecord Element Requirements Class: Record Components Schema Requirements Class
SWE Common Data Model OGC 08-094r1
element sequence
extension complexContent
complexType
The element contains all sub-elements inherited from “AbstractDataComponentType” as well as a list of at least one “field” property elements, each with a “name” attribute and
containing the data component element that defines the field.
The XML example below describes a record composed of weather data fields. In this case the “DataRecord” element is used as a data descriptor and the corresponding data
stream is usually composed of several tuples of values, each tuple corresponding to one record as defined here:
swe:DataRecord swe:label
Weather Data Record swe:label
swe:description Record of synchronous weather measurements
swe:description swe:field
name =
time swe:Time
definition =
http:www.opengis.netdefpropertyOGC0SamplingTime referenceFrame
= http:www.opengis.netdeftrsOGC0GPS
swe:label Sampling Time
swe:label swe:uom
xlink:href =
http:www.opengis.netdefuomISO-86010Gregorian swe:Time
swe:field swe:field
name =
temperature swe:Quantity
definition =
http:mmisw.orgontcfparameterair_temperature swe:label
Air Temperature swe:label
swe:uom code
= Cel
swe:Quantity swe:field
swe:field name
= pressure
swe:Quantity definition
= http:mmisw.orgontcfparameterair_pressure_at_sea_level
swe:label Air Pressure
swe:label swe:uom
code =
mbar swe:Quantity
swe:field swe:field
name =
windSpeed swe:Quantity
definition =
http:mmisw.orgontcfparameterwind_speed swe:label
Wind Speed swe:label
swe:uom code
= kmh
swe:Quantity swe:field
swe:field name
= windDirection
swe:Quantity definition
= http:mmisw.orgontcfparameterwind_to_direction
swe:label Wind Direction
swe:label swe:uom
code =
deg swe:Quantity
swe:field swe:DataRecord
Each field shall have a unique name within the record Req 39. This is enforced by a Schematron pattern.
The “DataRecord” element can also carry its own “definition” attribute to carry semantics about the whole group of values. The next example shows how radial
distortion coefficients of a frame camera sensor could be encoded in this way:
Copyright © 2011 Open Geospatial Consortium
91
OGC 08-094r1 SWE Common Data Model
swe:DataRecord definition
= urn:x-ogc:def:property:CSM::RadialDistortionCoefficients
swe:label Radial Distortion Coefficients
swe:label swe:field
name =
k1 swe:Quantity
definition =
urn:x-ogc:def:property:CSM::DISTOR_RAD1 swe:uom
code =
mm-2 swe:value
1.92709e-005 swe:value
swe:Quantity swe:field
swe:field name
= k2
swe:Quantity definition
= urn:x-ogc:def:property:CSM::DISTOR_RAD2
swe:uom code
= mm-2
swe:value -5.14206e-010
swe:value swe:Quantity
swe:field swe:field
name =
k3 swe:Quantity
definition =
urn:x-ogc:def:property:CSM::DISTOR_RAD3 swe:uom
code =
mm-2 swe:value
-3.33356e-012 swe:value
swe:Quantity swe:field
swe:DataRecord
Note: URNs used in this example haven’t been registered with OGC yet so they are in the “x-ogc” namespace.
The “DataRecord” element is fully recursive so that each field can itself be a “DataRecord”, but most importantly each field can be any other data component defined
in this standard such as “Vector”, “DataChoice” and “DataArray”.
Examples above only make use of field components with minimum metadata, but each of these fields can have all the possible content defined in clause 8.1, including quality,
constraints, etc.