How to retrieve observations, features of interest and sensor metadata?

Retrieving data from the SOS is the most common use case. Such data are first of all the observations offered by an SOS. For being able to process those observations a client can further request general service metadata, detailed metadata descriptions of sensors which made the observations, as well as descriptions of features of interest which were target of the observations. To request those four kinds of information resources the SOS 2.0 defines the following operations:

  • GetCapabilities - This operation gives access to metadata of an SOS server and detailed information about the available operations. (see here for more information on the response of this operation)
  • DescribeSensor - allows requesting of detailed metadata descriptions about the sensors and sensor systems available by an SOS server.
  • GetObservation - allows the querying of observations. The client can apply spatial, temporal and thematic filters to request observtions.
  • GetFeatureOfInterest - can be called to retrieve the features of interest for which the SOS offers observations. Contrary to the above operations, this operation is optional, i.e. an SOS server does not have to provide it.

A typical workflow of using those operations is depicted in the UML class diagram below. This workflow can for example applied in scenarios where a client is used to (1) connect to a SOS, (2) display features of interest of a certain geographic region in a map, (3) query observations for those features and display them in a diagram (e.g. a timeseries diagram), and (4) give further information for selected sensors. These four steps can be realized by SOS operation calls:

  1. Connecting to a SOS for getting service metadata and a description of its data contents is done by calling the GetCapabilities operation. With the information contained in the returned Capabilities document a user can generally determine whether the data provided by the SOS is of interest for him. For example, he can check whether data for 'interesting' observed properties are hosted.
  2. Next, a client application could for example offer the display of features of interest in a map. To query such features of interest for a certain spatial extent the GetFeatureOfInterest operation is called. The returned feature descriptions are encoded in GML and usually contain a geometric description of the feature.
  3. Now the user wants to retrieve the actual observations and therefore the client calls the GetObservation operation and specifies filters, such as an observed property, features of interest (a subset of those which have been retrieved in step 2), and a temporal filter, according to the users needs.
  4. Finally, the user might be interested in details of a sensor which produced certain observations. To retrieve those metadata the client calls the DescribeSensor operation.

 

Example Use Cases

 

a) Stationary Sensor Network

A client needs to access and display observations from an SOS 2.0 server which hosts data from a network of sensor stations measuring air quality which are distributed across Europe (as examples we consider here: Hohe Mark and Moersbach in Germany, Raamsdonkveer and Marknesse in Netherlands). Each station of the network has a set of sensors attached which observe air quality parameters such as NH3, H2S, CO and SO2.

The following steps are performed by the client application:

1.) The client starts by calling the GetCapabilities request which returns the Capabilities document of the SOS. By parsing and analyzing that document, the client gets information about:

  • references to relatedFeatures which can be resolved to display e.g. the features geometry (and/or attribution) to the user. In this case, the countries and towns within which the air quality stations are located, are listed in the Capabilities document. 
  • observableProperties that are measured by the sensor systems of the SOS and for which data can be requested in following GetObservation requests.
  • the time frames (phenomeonTime) for which observations are available. To get more detailed information about the temporal availability of sensor data the GetDataAvailability operation can be called.
  • the observedArea as the bounding box within which the observations were made. This information can for example be used by the client application to zoom to that extent of a map.
  • the responseFormat (= O&M 2.0) and the observationType. This informs the client about how to decode observations.
  • ...

More explanation on how to interpret the Capabilities document is given here.

2.) The client calls the GetFeatureOfInterest request. Within the request, the client defines a spatial filter - this could be for example a bounding box drawn by the user on a map to specify in which area air quality stations are located that are of interest.

Next, the client parses the returned GetFeatureOfInterest response which contains the GML descriptions of the sampling features within the defined spatial filter. The client can use those descriptions for example to display the sampling feature's geometries on a map and could in a next step allow the user to select those features for requesting associated observations.

3.) Finally, the client calls the GetObservation request which contains observedProperties selected by the user as well as a time frame and features that are of interest. O&M encoded observations are  returned in the GetObservation response. They can for example be used by the client to generate time series charts of the measured data.

 

b) Mobile Sensors

1.) GetCapabilitiesResponse

2.) GetObservation request and GetObservationResponse