Rules for Range Components

SWE Common Data Model OGC 08-094r1 When a field is marked as optional in the definition, the token ‘Y’ or ‘N’ shall be inserted in the data block. When the field value is omitted, the token ‘N’ is inserted alone. When it is included, the token ‘Y’ is inserted followed by the actual field value. Requirement http:www.opengis.netspecSWE2.0reqtext-encoding-rulesoptional-field-marker-present Req 92. The ‘Y’ or ‘N’ token shall be inserted in a text encoded data block for all fields that have the “optional” attribute set to ‘true’. Coordinate values of “Vector” components are encoded with a similar syntax, but a coordinate value can only be scalar and cannot be omitted: coord-count = Number of coordinates in the vector minus one. Greater or equal to 0 vector-values = scalar-value coord-counttoken-separator scalar-value The following example shows how elements of an array defined as a “DataRecord” are encoded with the text method: swe:DataArray definition = http:sweet.jpl.nasa.gov2.0mathFunction.owlFunction swe:description Measurement error vs. temperature swe:description swe:elementCount swe:Count swe:value 5 swe:value swe:Count swe:elementCount swe:elementType name = point swe:DataRecord swe:label Error vs. Temperature swe:label swe:field name = temp swe:Quantity definition = http:sweet.jpl.nasa.gov2.0physThermo.owlTemperature swe:label Temperature swe:label swe:uom code = Cel swe:Quantity swe:field swe:field name = error swe:Quantity definition = http:sweet.jpl.nasa.gov2.0sciUncertainty.owlError swe:label Relative Error swe:label swe:uom code = swe:Quantity swe:field swe:DataRecord swe:elementType swe:encoding swe:TextEncoding blockSeparator = tokenSeparator = , swe:encoding swe:values 0,5 10,2 50,2 80,5 100,15 swe:values swe:DataArray In this example, each element consists of a record of two values. The array element structure also corresponds to one block so that tuples are separated by block separators here the ‘,’ character. Since the array is of size 5, there are 5 tuples listed sequentially in the data block, each one composed of the two values of the data record separated by the token separator. The pattern is “temp,error temp,error …” since values have to be listed in the same order as the fields. Copyright © 2011 Open Geospatial Consortium 121