Time Element Requirements Class: Basic Types and Simple Components Schemas Requirements Class

SWE Common Data Model OGC 08-094r1 element name = uom type = swe:UnitReference element name = constraint maxOccurs = 1 minOccurs = type = swe:AllowedTimesPropertyType element maxOccurs = 1 minOccurs = name = value type = swe:TimePosition sequence attribute name = referenceTime type = dateTime use = optional attribute name = localFrame type = anyURI use = optional extension complexContent complexType The “uom” property element is of type “UnitReferencePropertyType”. It has the same requirements as its equivalent in the “Quantity” element. When ISO 8601 calendar notation is used, it is specified as a unit by using a special value in the “xlink:href” attribute i.e. for simplicity, a calendar representation is considered here as a complex unit composed of year, month, day, hours, minutes and seconds. Requirement http:www.opengis.netspecSWE2.0reqxsd-simple-componentsiso8601-uom-used Req 65. When ISO 8601 notation is used to express the measurement value associated to a “Time” element, the URI “http:www.opengis.netdefuomISO‐ 86010Gregorian” shall be used as the value of the “xlink:href” XML attribute on the “uom” element. Additional constraints on the value can be expressed by using the “AllowedTimes” element detailed in clause 8.1.17. The “value” property element takes either a decimal value or a calendar value encoded according to the ISO 8601 standard. This is enforced by using the “TimePosition” simple type defined below as the union of the “double” and “TimeIso8601” data types: simpleType name = TimePosition union memberTypes = double swe:TimeIso8601 simpleType simpleType name = TimeIso8601 union memberTypes = date time dateTime swe:TimeIndeterminateValue simpleType simpleType name = TimeIndeterminateValue restriction base = string enumeration value = now restriction simpleType The “double” data type is used to express time as a scalar decimal number i.e. a duration and can be any of the special values “-INF”, “INF” and “NaN” just like the value of a “Quantity” component. The “date”, “time” and “dateTime” data types are built-in types of XML Schema and are implemented according to ISO 8601 complete representations of date, time and combination of date and time respectively see XML schema 1.0 specification and ISO 8601 for details on the format. Copyright © 2011 Open Geospatial Consortium 77 OGC 08-094r1 SWE Common Data Model The example below shows how to use this XML element to specify the sampling time of a measurement: swe:Time definition = http:www.opengis.netdefpropertyOGC0SamplingTime referenceFrame = http:www.opengis.netdeftrsOGC0GPS swe:label Sampling Time swe:label swe:description Time at which the measurement was made swe:description swe:uom xlink:href = http:www.opengis.netdefuomISO-86010Gregorian swe:value 2009-11-05T16:29:26Z swe:value swe:Time Note the “referenceFrame” attribute which clarifies the time reference system used. Here the GPS time standard, which is different from UTC and TAI is used. The presence of the mandatory “referenceFrame” attribute see Req 27 is enforced by an additional Schematron assertion. As mentioned above, the “Time” element can also be used to specify a time after an epoch by specifying a time of reference and using a scalar numerical value. This is shown in the following example with a UNIX time: swe:Time definition = http:www.opengis.netdefpropertyOGC0RunTime referenceTime = 1970-01-01T00:00:00Z swe:label Model Run Time swe:label swe:description Run time of the model expressed as a Unix time swe:description swe:uom code = s swe:value 1257415633 swe:value swe:Time The “localFrame” attribute can be used to indicate the time frame whose origin is given by the time component value. This way several time positions can be defined relative to each other. The next example shows how this can be used to express times of high frequency scan lines acquired by an airborne scanner relative to the flight’s start time: swe:Time definition = http:www.opengis.netdefpropertyOGC-EO0MissionStartTime localFrame = MISSION-START-TIME referenceFrame = http:www.opengis.netdeftrsOGC0UTC swe:label Flight Time swe:label swe:description Time at take-off in UTC swe:description swe:uom xlink:href = http:www.opengis.netdefuomISO-86010Gregorian swe:value 2009-01-26T10:21:45+01:00 swe:value swe:Time Scan times are then expressed relative to the flight’s start time: swe:Time definition = http:www.opengis.netdefpropertyOGC-EO0ScanStartTime localFrame = SCAN-START-TIME referenceFrame = MISSION-START-TIME swe:label Scanline Time swe:label swe:description Acquisition time of the scan line swe:description swe:uom code = s swe:value 1256.235 swe:value swe:Time 78 Copyright © 2011 Open Geospatial Consortium SWE Common Data Model OGC 08-094r1 In the snippet above the reference frame is the previously defined mission start time which means that the time value is relative to this time of reference. The value can then be encoded as a float for better efficiency. Note: A simple duration expressed outside of any time reference system should be defined by using a “Quantity” rather than a “Time” element.

8.1.9 CategoryRange Element

The “CategoryRange” element is the XML schema implementation of the “CategoryRange” UML class defined in clause 7.2.11. The schema snippet for this element and its corresponding complex type is shown below: element name = CategoryRange substitutionGroup = swe:AbstractSimpleComponent type = swe:CategoryRangeType complexType name = CategoryRangeType complexContent extension base = swe:AbstractSimpleComponentType sequence element name = codeSpace maxOccurs = 1 minOccurs = type = swe:Reference element name = constraint maxOccurs = 1 minOccurs = type = swe:AllowedTokensPropertyType element name = value maxOccurs = 1 minOccurs = type = swe:TokenPair sequence extension complexContent complexType This element is used exactly in the same way as the “Category” element except that the “value” property takes a space separated pair of tokens. The example below illustrates the representation of an approximative dating as a range of geological eras: swe:CategoryRange definition = http:sweet.jpl.nasa.gov2.0timeGeologic.owlGeologicTime swe:label Approximate Dating swe:label swe:description Approximate geological dating expressed as a range of geological eras swe:description swe:codeSpace xlink:href = http:sweet.jpl.nasa.gov2.0timeGeologic.owlEra swe:value Paleozoic Mesozoic swe:value swe:CategoryRange The pair of values can be omitted like with any other data component in the case where it is provided in a separate data stream.

8.1.10 CountRange Element

The “CountRange” element is the XML schema implementation of the “CountRange” UML class defined in clause 7.2.12. The schema snippet for this element and its corresponding complex type is shown below: Copyright © 2011 Open Geospatial Consortium 79 OGC 08-094r1 SWE Common Data Model element name = CountRange substitutionGroup = swe:AbstractSimpleComponent type = swe:CountRangeType complexType name = CountRangeType complexContent extension base = swe:AbstractSimpleComponentType sequence element name = constraint maxOccurs = 1 minOccurs = type = swe:AllowedValuesPropertyType element name = value maxOccurs = 1 minOccurs = type = swe:IntegerPair sequence extension complexContent complexType This element is used exactly in the same way as the “Count” element except that the “value” property takes a space separated pair of integers. The next example shows how to specify an array index range: swe:Count definition = http:www.opengis.netdefpropertyOGC0ArrayIndex swe:label Index Range swe:label swe:value 0 9999 swe:value swe:Count The pair of values can be omitted like with any other data component in the case where it is provided in a separate data stream.

8.1.11 QuantityRange Element

The “QuantityRange” element is the XML schema implementation of the “QuantityRange” UML class defined in clause 7.2.13. The schema snippet for this element and its corresponding complex type is shown below: element name = QuantityRange substitutionGroup = swe:AbstractSimpleComponent type = swe:QuantityRangeType complexType name = QuantityRangeType complexContent extension base = swe:AbstractSimpleComponentType sequence element name = uom type = swe:UnitReference element name = constraint maxOccurs = 1 minOccurs = type = swe:AllowedValuesPropertyType element name = value maxOccurs = 1 minOccurs = type = swe:RealPair sequence extension complexContent complexType This element is used exactly in the same way as the “Quantity” element except that the “value” property takes a space separated pair of double values. The next example shows how to express the operational range of a thermometer in Kelvins: swe:QuantityRange definition = http:mmisw.orgontmmideviceOperationalRange swe:label Operational Range swe:label swe:description Operational range of the cryogenic thermometer swe:description swe:uom code = K swe:value 10 300 swe:value swe:QuantityRange 80 Copyright © 2011 Open Geospatial Consortium