Sensor Observation Service
- Open Geospatial Consortium, Inc
- Sensor Observation Service
The Sensor Web is a collection of standards and software solutions that allows the management of and data retrieval from sensors through the internet. The Open Geospatial Consortium's (OGC) Sensor Observation Service (SOS) is the core web service to provide sensor data in an interoperable, standardized way. Because its goals are so generic, this service is relatively complex, e.g. it needs other standards for request and query markup, and standards for data markup and encoding. This complexity makes it hard for non-Sensor Web specialists to benefit from publishing their data using SOSs, or analyzing data retrieved from other's or even someone's own SOS instances. The recently published sos4R CRAN package tries to overcome this hurdle by providing a relatively simple R interface to the SOS. The main contribution of the package is a set of R functions for the core SOS operations for data retrieval. These suffice for many common use cases by encapsulating the complexity of the SOS interface. This work presents the technical background of accessing a XML-based web service from R using the packages RCurl and XML. It shows how the generic work flow of request building, encoding, data transfer and data decoding can be modelled in R classes and methods. Flexible mechanisms allow users to easily add features and adapt entire processing steps, or just the required parts, to their needs. We also present example analyses based on publicly available SOS that illustrate the potential and advantages of building analyses and visualizations in R directly on SOS. These programmes can be based on near real-time data, but can also be the base for reproducibility of analyses. Reproducible research is already supported well by a variety of R packages, and these are now further complemented with open, online data sources such as those found in the Sensor Web. Finally, we describe future work, especially on the integration of the SOS respectively OGC data models with existing and upcoming endeavours for spatio-temporal data in R, like the spacetime CRAN package.