Accessing a Sensor Observation Service (SOS)
This Wiki Page will serve as simple "How to" for accessing a SOS.
Data Sources
Sensor Observation Services
- Pegelonline (Water Gauge Sensors) http://www.pegelonline.wsv.de/webservices/gis/sos
- National Data Buoy Center http://sdf.ndbc.noaa.gov/sos/server.php?service=SOS
- TEO (provides Sensor Observation Service for real time UV data (Texas)) http://sensorweb.cse.unt.edu:8080/teo/sos
- UBA Sensor Observation Service http://gis-obama.uni-muenster.de:8180/UBA_SOS/sos
- Gulf of Maine Ocean Observing System (GoMOOS) http://www.gomoos.org/cgi-bin/sos/V1.0/oostethys_sos.cgi?
- COSYNA SOS Service http://kopc02.gkss.de/sos/sos.py?service=SOS
- Carolinas RCOOS SOS http://neptune.baruch.sc.edu/cgi-bin/oostethys_sos.cgi?service=SOS&version=1.0
Generic SOS Client
Basics

Go to the Generic SOS Client Page and insert the SOS URL from Pegelonline http://www.pegelonline.wsv.de/webservices/gis/sos into the Service URL field.
Select under Request Examples "GetCapabilities_allSections". Press send and wait a few moment. A large XML Document should open which contains the complete Capabilities of this SOS.
Under the <sos:Contents> Tag you will find Contents of this SOS. You will see a lot of <sos:procedure> Tags which hold information about the Sensors which are available. Below the <sos:procedure> Tags are the observed Properties in the <sos:observedProperty> Tags. After that the Feature of Interest follow which are the places where Sensors are located.
<sos:procedure>
<sos:procedure xlink:href="Wasserstand - Ruwer (0002650015)"/>
<sos:procedure xlink:href="MHW - Ruwer (0002650015)"/>
<sos:procedure xlink:href="MW - Ruwer (0002650015)"/>
<sos:procedure xlink:href="MNW - Ruwer (0002650015)"/>
<sos:procedure xlink:href="PNP - Ruwer (0002650015)"/>
<sos:observedProperty>
<sos:observedProperty xlink:href="Pegelnullpunkt"/>
<sos:observedProperty xlink:href="mittlerer niedrigster Wasserstand"/>
<sos:observedProperty xlink:href="Mittelwert Wasserstand"/>
<sos:observedProperty xlink:href="mittlerer hoechster Wasserstand"/>
<sos:featureOfIntereset>
<sos:featureOfInterest xlink:href="Pinnau-Sperrwerk Bp (5970018)"/>
<sos:featureOfInterest xlink:href="Karnin (9690084)"/>
<sos:featureOfInterest xlink:href="Neuendorf Hafen (9670046)"/>
<sos:featureOfInterest xlink:href="Stralsund (9650043)"/>
<sos:featureOfInterest xlink:href="Hanau Bruecke Dfh (24700347)"/>
<sos:featureOfInterest xlink:href="Ruwer (0002650015)"/>
The capabilities document holds as well information about what kind of data is observed. This is also located under the <sos:Contents> tag. Right under the tag you see ObservationOfferingList which hold information about the offered Observations. In the case of the Pegelonline SOS it is just one type of Observation - the "Wasserstand Rohdaten". The observed area is described, as well as the ID (urn:ogc:offering:offering0) of the offered observation. We will need it later for Requests.
<sos:ObservationOfferingList>
<sos:ObservationOfferingList>
<sos:ObservationOffering gml:id="urn:ogc:offering:offering0">
<gml:name>Wasserstand Rohdaten</gml:name>
<gml:boundedBy>
<gml:Envelope srsName="urn:ogc:def:crs:EPSG:31467">
<gml:lowerCorner>3309400.6136173555 5280397.92</gml:lowerCorner>
<gml:upperCorner>3894397.1591280675 6098775.0</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
After exploring the GetCapabilities XML we are going to querry ask the SOS for a Basic Description of one of its Sensors. Go Back to the Generic SOS Client homepage check that the Service URL ist still correct and select the DescribeSensor_basicRequest.xml
The XML document which will be displayed has one tag in where the sensor is specified which will be decribed. Since we are not using the given Example SOS we have to replace the content of this tag which one provided from the GetCapabilites Document of the Pegelonline SOS. For now we choose the "Wasserstand - Ruwer (0002650015)" Sensor from above.
After replacing the Sensor, the XML which will be posted to the SOS should look like :
DescribeSensor_basicRequest.xml
<?xml version="1.0" encoding="UTF-8"?>
<DescribeSensor version="1.0.0" service="SOS"
xmlns="http://www.opengis.net/sos/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sos/1.0
http://schemas.opengis.net/sos/1.0.0/sosDescribeSensor.xsd"
outputFormat="text/xml;subtype="sensorML/1.0.1"">
<procedure>Wasserstand - Ruwer (0002650015)</procedure>
</DescribeSensor>
After posting the XML to the SOS the answer will be an XML as well and contains a description of this praticular sensor in SensorML. It holds information like the Sensors Position, the input of the Sensor, the output amongst other things.
The next Step is to querry the SOS for a particular observed property of a particular feature of interest. Go back to the client homepage and select the GetObs_basic.xml
We will enhance the provided request a bit by adding a feature of interest. We insert the ID of the observation we are interessted in betwen the Tags, this is easy in our case since this SOS only serves one - Water Gauge (urn:ogc:offering:offering0).
Between the < observedProperty> Tags a Property can be added - for example "Pegelnullpunkt". Now we ad the feature we are interested in by simply adding < featureOfInterest> Tags along with the Feature Ruwer (0002650015) Because we have the ObjectID of the feature from the GetCapabilities Document we are enclosing it with < ObjectID> Tags.
After this your XML should look like :
GetObservationFilter
<?xml version="1.0" encoding="UTF-8"?>
<GetObservation xmlns="http://www.opengis.net/sos/1.0"
xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:om="http://www.opengis.net/om/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sos/1.0
http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd"
service="SOS" version="1.0.0" srsName="urn:ogc:def:crs:EPSG:4326">
<offering>urn:ogc:offering:offering0</offering>
<observedProperty>Pegelnullpunkt</observedProperty>
<featureOfInterest>
<ObjectID>Ruwer (0002650015)</ObjectID>
</featureOfInterest>
<responseFormat>text/xml;subtype="om/1.0.0"</responseFormat>
</GetObservation>
After you have pressed send you will get the Observations for Water Gauge Levels for the Sensor "Ruwer".





