SensorML 2.0 Examples

Simple Streaming - latest value

SensorML supports the ability to describe the components and encoding of real-time data streams, and to provide a link to the data stream itself. This thus allows one to connect directly to a real-time data stream directly from a SensorML description and use a generic SWE Common Data reader to parse the data stream. SWE Common, which is used throughout SensorML, allows for very efficient binary or ASCII-based data streams. Describing a data stream into or out of a process (or sensor/actuator) is accomplished by having the input or output be of type DataInterface. The DataInterface element allows one to describe the DataStream, as well as provides for an optional interface description.

The example below describes a sensor with a simple data stream consisting of time (in ISO-8601 encoding) and temperature. The data is described in the DataStream element. The optional interface description is not required and thus omitted. The data themselves can be accessed through the URL provided by the xlink:href attribute in the swe:values element. Accessing this URL would return either the latest value(s) or open up an html stream of real-time values. This approach allows for easy incorporation of SensorML into RESTFUL and Internet of Things (IoT) environments.

NOTE: SensorML 2.0 is not yet approved by the Open Geospatial Consortium (OGC). Examples are provided for evaluation and are subject to change during the standards review and approval process. Contact mike.botts@botts-inc.net for questions or recommendations.

 

The encoding of this data stream is specified in the SensorML description as TextEncoding with a comma separating tokens (or fields) and a space separating blocks (or records). A single measurement returned by the URL might look like:

   2012-05-23T19:36:15Z,26.3