The Scottish Government’s Air Quality Sensor Observation Service (SOS) provides a machine readable access point for air pollution measurements hosted on Air Quality in Scotland. The service supports the Scottish Government’s Open Data Policy.
The Scottish Air Quality SOS is based on the Open Geospatial Consortium’s (OGC) Sensor Observation Service standard which has been extended to conform with INSPIRE download service specifications. The service provides an AaPI type interface to Scottish Air Quality for developers and machine to machine data transfer in open, machine readable data formats. It is not aimed at the general public nor traditional desktop air quality data users. We still recommend the resources on Air Quality in Scotland’s data archive for desktop activities.
The SOS aggregates readings from live, in-situ air quality monitoring stations and provides an interface to make sensors and sensor data archives accessible via an interoperable web based interface. The Scottish Air Quality SOS is built on a 52°North SOS implementation which supports the OGC SOS versions 1.0.0, 2.0.0 and the European Air Quality e-Reporting data model (AQD version 1.0.0). A REST API is also supported.
The OGC SOS 2.0 specification has four extensions defined, three are include in the Scottish Air Quality SOS; Core, Enhanced and Result Handling. The Transactional extensions is not implemented.
A full description of the Scottish Air Quality SOS capabilities can be found at its end point using a GetCapabilities request. A brief description is provided below.
- GetCapabilities, for requesting a self-description of the service
- GetObservation, for requesting the pure sensor data encoded in Observations & Measurements 2.0 (O&M)
- DescribeSensor for requesting information about a certain sensor, encoded in a Sensor Model Language 1.0.1 (SensorML 1.0.1) instance document.
- GetFeatureOfInterest, for requesting the GML 3.2.1 encoded representation of the feature that is the target of the observation
- GetObservaitonById, for requesting the pure sensor data for a specific observation identifier
- Not implemented
Result Handling Extension
- InsertResultTemplate, not implemented.
- InsertResult, not implemented.
- GetResultTemplate, for getting the result structure and encoding for specific parameter constellations
- GetResult, for getting the raw data for specific parameter constellations
For more information about the SOS 2.0 specification, see the official OGC SOS 2.0 tutorial.
A binding describes how SOS clients and servers can communicate with each other (OGC#12-006). The following bindings are supported by the UK-AIR SOS.
- KVP - Key Value Pair encoding of requests via HTTP GET.
- SOAP - SOAP based encoding of all extensions via HTTP POST.
- POX - XML based encoding of all extensions via HTTP POST (without SOAP wrapping).
- REST - RESTful binding for all useful operations of resources being available in the SOS. Download the documentation (PDF 880 KB).
- JSON - JSON based encoding of all extensions via HTTP POST.
- EXI - Efficient XML Interchange (EXI) Format 1.0 based encoding of all extensions via HTTP POST and POX encoded request. SOAP requests are currently not supported via the EXI binding.
A list of the pollutants included in the Scottish Air Quality SOS is provided on the SOS Pollutants page.
Querying the SOS
Some examples of how the SOS can be queried are provided in two common bindings (KVP and JSON) which are available to download. Download documentation for the REST API.