SOS-作战

本节提供有关SOS服务器提供的操作类型的详细信息。在介绍操作之前,有必要回顾一下SOS使用的术语。

考虑一个在工业区部署传感器来监测一氧化碳排放的情况。每个传感器都被安置在一个单独的建筑物里。在这种情况下,每个建筑都是一个感兴趣的特征,每个物理传感器代表一个过程,每个建筑的一氧化碳排放是一个可观察的属性。在某个时间点测量一氧化碳排放量的行为是一种观察。

  • 特点:对现实世界现象的抽象。

  • 度量:以确定一个量的值为目标的一组操作。

  • 观察到的属性:由一个过程观察到的名称所引用的对象的方面或属性。

  • 观察:观察财产的行为。

  • 观测产品:观测产品将一个过程(如传感器系统)产生的观测值集合进行分组,并列出相关观测值的基本元数据,包括观测值的观测属性。

  • 程序:可用于观察的方法、算法、仪器、传感器或系统。

  • 传感器:提供有关所观察属性的信息作为其输出的实体。传感器综合使用物理、化学或生物手段来估计潜在的观测特性。在测量链的末端,电子设备产生待处理的信号。

  • 传感器系统:其组件是传感器的系统。作为一个整体,传感器系统本身可以被称为具有自己的管理和传感器输出接口的传感器。此外,传感器系统的组件可以单独寻址。

SOS通过下表所列的一系列操作应用了上述概念。

SOS业务

Operation

Description

GetCapabilities

返回服务元数据,该元数据列出了可从SOS服务获得的观测产品。

DescribeSensor

返回与SOS关联的过程或传感器的描述。

GetObservation

返回过程或传感器收集的观测数据。

GetFeatureOfInterest (可选)

返回SOS提供观测结果的相关特征的描述。

GetObservationById (可选)

允许客户端应用程序通过传递指向该观察的指针来检索该观察。

InsertSensor (可选)

在SOS中注册一个新的传感器系统。

DeleteSensor (可选)

从SOS中删除一个新的传感器系统。

InsertObservation (可选)

允许客户端应用程序为已注册的传感器系统插入新的观测值。

InsertResultTemplate (可选)

允许客户端应用程序上载结果值的模板,以便使用InsertResult操作的后续调用将符合模板的结果值插入到SOS中。

InsertResult (可选)

允许客户端应用程序通过仅插入观察结果并重用模板提供的其他元数据来为传感器系统插入新的观测值。

GetResultTemplate (可选)

返回一个结果模板,该模板描述特定过程或传感器用于生成新观测结果的确切结构。

GetResult (可选)

允许只检索观察的结果值,而不检索观察的整个元数据。

以下是可以发送给SOS提供的操作的请求示例。可以使用诸如 CURLwgetJMeter

GetCapabilities

此操作返回有关SOS的元数据和其他描述性信息。

请求

与其他OGC web服务一致 GetCapabilities 请求接受服务标识符、版本号和请求标识符作为参数。通过HTTP Get方法发送的GetCapabilities请求的示例如下:

http://sensorweb.demo.52north.org/52n-sos-webapp/service?
service=SOS&
version=2.0.0&
request=GetCapabilities

链接到 GetCapabilities 请求是 here

在上面的例子中,传递给SOS服务器的参数(和值), SERVICE=SOSVERSION=2.0.0REQUEST=GetCapabilities

  • 这个 SERVICE 参数告诉服务器SOS请求即将到来。

  • 这个 VERSION 参数告诉服务器正在请求哪个版本的服务。

  • 这个 REQUEST 参数告诉服务器请求的操作是 GetCapabilities 操作。

执行下表和请求所需的参数和值。

响应

响应是一个能力XML文档,其中详细描述了SOS服务。它包含三个主要部分:

章节能力文件

ServiceIdentification

包含服务元数据,如服务名称、关键字和操作服务器的组织的联系信息。

ServiceProvider

标识提供服务的实体、组织或个人。

OperationsMetadata

列出可从服务请求的可用操作及其终结点。

Contents

可从传感器请求的观察和服务列表中获取服务。

下面显示了一个来自SOS的GetCapabilities响应示例,为简洁起见,省略了一些部分。

<sos:Capabilities xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:swes="http://www.opengis.net/swes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/fes/2.0 http://schemas.opengis.net/filter/2.0/filterAll.xsd http://www.opengis.net/swes/2.0 http://schemas.opengis.net/swes/2.0/swes.xsd http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosGetCapabilities.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsAll.xsd">
  <ows:ServiceIdentification>
    <ows:Title xml:lang="eng">52N SOS</ows:Title>
    <ows:Abstract xml:lang="eng">52North Sensor Observation Service - Data Access for the Sensor Web</ows:Abstract>
    <ows:ServiceType>SOS</ows:ServiceType>
    <ows:ServiceTypeVersion>2.0.0</ows:ServiceTypeVersion>
    <ows:Profile>http://www.opengis.net/spec/SOS/1.0/conf/core</ows:Profile>
    <ows:Profile>http://www.opengis.net/spec/SWE/2.0/conf/core</ows:Profile>
    <ows:Fees>NONE</ows:Fees>
    <ows:AccessConstraints>NONE</ows:AccessConstraints>
  </ows:ServiceIdentification>
  <ows:ServiceProvider>
    <ows:ProviderName>52North</ows:ProviderName>
    <ows:ProviderSite xlink:href="http://52north.org/swe"/>
    <ows:ServiceContact>
      <ows:IndividualName>Oliver Twist</ows:IndividualName>
      <ows:ContactInfo>
        <ows:Phone>
          <ows:Voice>+49(0)251/396 371-0</ows:Voice>
        </ows:Phone>
      </ows:ContactInfo>
    </ows:ServiceContact>
  </ows:ServiceProvider>
  <ows:OperationsMetadata>
    <ows:Operation name="DescribeSensor">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="http://sensorweb.demo.52north.org/52n-sos-webapp/service/kvp?">
            <ows:Constraint name="Content-Type">
              <ows:AllowedValues>
                <ows:Value>application/x-kvp</ows:Value>
              </ows:AllowedValues>
            </ows:Constraint>
          </ows:Get>
          <ows:Post xlink:href="http://sensorweb.demo.52north.org/52n-sos-webapp/service/pox">
            <ows:Constraint name="Content-Type">
              <ows:AllowedValues>
                <ows:Value>application/xml</ows:Value>
                <ows:Value>text/xml</ows:Value>
              </ows:AllowedValues>
            </ows:Constraint>
          </ows:Post>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="procedure">
        <ows:AllowedValues>
          <ows:Value>urn:x-sos:def:procedure:x-sos::Bad_Vöslau-Airquality</ows:Value>
          <ows:Value>urn:x-sos:def:procedure:x-sos::Biedermannsdorf-Airquality</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="procedureDescriptionFormat">
        <ows:AllowedValues>
          <ows:Value>http://www.opengis.net/sensorML/1.0.1</ows:Value>
          <ows:Value>http://www.opengis.net/waterml/2.0/observationProcess</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="validTime">
        <ows:AnyValue/>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="GetCapabilities">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="http://sensorweb.demo.52north.org/52n-sos-webapp/service/kvp?">
            <ows:Constraint name="Content-Type">
              <ows:AllowedValues>
                <ows:Value>application/x-kvp</ows:Value>
              </ows:AllowedValues>
            </ows:Constraint>
          </ows:Get>
          <ows:Post xlink:href="http://sensorweb.demo.52north.org/52n-sos-webapp/service/pox">
            <ows:Constraint name="Content-Type">
              <ows:AllowedValues>
                <ows:Value>application/xml</ows:Value>
                <ows:Value>text/xml</ows:Value>
              </ows:AllowedValues>
            </ows:Constraint>
          </ows:Post>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="AcceptFormats">
        <ows:AllowedValues>
          <ows:Value>application/xml</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="AcceptVersions">
        <ows:AllowedValues>
          <ows:Value>1.0.0</ows:Value>
          <ows:Value>2.0.0</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="Sections">
        <ows:AllowedValues>
          <ows:Value>All</ows:Value>
          <ows:Value>Contents</ows:Value>
          <ows:Value>FilterCapabilities</ows:Value>
          <ows:Value>InsertionCapabilities</ows:Value>
          <ows:Value>OperationsMetadata</ows:Value>
          <ows:Value>ServiceIdentification</ows:Value>
          <ows:Value>ServiceProvider</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="updateSequence">
        <ows:AnyValue/>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="GetObservation">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="http://sensorweb.demo.52north.org/52n-sos-webapp/service/kvp?">
            <ows:Constraint name="Content-Type">
              <ows:AllowedValues>
                <ows:Value>application/x-kvp</ows:Value>
              </ows:AllowedValues>
            </ows:Constraint>
          </ows:Get>
          <ows:Post xlink:href="http://sensorweb.demo.52north.org/52n-sos-webapp/service/pox">
            <ows:Constraint name="Content-Type">
              <ows:AllowedValues>
                <ows:Value>application/xml</ows:Value>
                <ows:Value>text/xml</ows:Value>
              </ows:AllowedValues>
            </ows:Constraint>
          </ows:Post>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="featureOfInterest">
        <ows:AllowedValues>
          <ows:Value>http%3A%2F%2Fedusvr218.geo.sbg.ac.at%3A8080%2Fgeoserver%2Fsos%2Fows%3Fservice%3DWFS%26version%3D1.0.0%26request%3DGetFeature%26typeName%3Dsos%3Aaustria%26outputFormat%3Dapplication%2Fjson%26CQL_FILTER%3DLOCALNAME%3D%27Ober%C3%B6sterreich%27</ows:Value>
          <ows:Value>http%3A//edusvr218.geo.sbg.ac.at%3A8080/geoserver/sos/ows%3Fservice%3DWFS%26version%3D1.0.0%26request%3DGetFeature%26typeName%3Dsos%3Aaustria%26outputFormat%3Dapplication%252Fgml%252Bxml%253B%2520version%253D3.2%26CQL_FILTER%3DLOCALNAME%3D%27Steiermark%27</ows:Value>
          <ows:Value>http://edusvr218.geo.sbg.ac.at:8080/geoserver/sos/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=sos:austria&amp;outputFormat=application/json&amp;CQL_FILTER=LOCALNAME='Niederösterreich'</ows:Value>
          <ows:Value>http://edusvr218.geo.sbg.ac.at:8080/geoserver/sos/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=sos:austria&amp;outputFormat=application/json&amp;CQL_FILTER=LOCALNAME='Steiermark'</ows:Value>
          <ows:Value>http://wfs.example.org?request=getFeature&amp;featureid=river1</ows:Value>
          <ows:Value>urn:x-sos:def:foi:x-sos::Hochwurzen</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="observedProperty">
        <ows:AllowedValues>
          <ows:Value>urn:ogc:def:phenomenon:OGC:carbonMonoxide</ows:Value>
          <ows:Value>urn:ogc:def:phenomenon:OGC:nitrogenDioxide</ows:Value>
          <ows:Value>urn:ogc:def:phenomenon:OGC:nitrogenMonoxide</ows:Value>
          <ows:Value>urn:ogc:def:phenomenon:OGC:nitrogenOxide</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="offering">
        <ows:AllowedValues>
          <ows:Value>urn:x-sos:def:offering:x-sos::Bad_Vöslau-Airquality</ows:Value>
          <ows:Value>urn:x-sos:def:offering:x-sos::Biedermannsdorf-Airquality</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="procedure">
        <ows:AllowedValues>
          <ows:Value>urn:x-sos:def:procedure:x-sos::Bad_Vöslau-Airquality</ows:Value>
          <ows:Value>urn:x-sos:def:procedure:x-sos::Biedermannsdorf-Airquality</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="responseFormat">
        <ows:AllowedValues>
          <ows:Value>application/json</ows:Value>
          <ows:Value>http://www.opengis.net/om/2.0</ows:Value>
          <ows:Value>http://www.opengis.net/waterml-dr/2.0</ows:Value>
          <ows:Value>http://www.opengis.net/waterml/2.0</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="spatialFilter">
        <ows:AllowedValues>
          <ows:Range>
            <ows:MinimumValue>0.0 -122.6819</ows:MinimumValue>
            <ows:MaximumValue>52.0464393 13.72376</ows:MaximumValue>
          </ows:Range>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="temporalFilter">
        <ows:AllowedValues>
          <ows:Range>
            <ows:MinimumValue>2012-11-19T17:45:15.000Z</ows:MinimumValue>
            <ows:MaximumValue>2012-11-19T17:45:15.000Z</ows:MaximumValue>
          </ows:Range>
        </ows:AllowedValues>
      </ows:Parameter>
    </ows:Operation>
    <ows:Parameter name="crs">
      <ows:AllowedValues>
        <ows:Value>http://www.opengis.net/def/crs/EPSG/0/4326</ows:Value>
      </ows:AllowedValues>
    </ows:Parameter>
    <ows:Parameter name="language">
      <ows:AllowedValues>
        <ows:Value>eng</ows:Value>
      </ows:AllowedValues>
    </ows:Parameter>
    <ows:Parameter name="service">
      <ows:AllowedValues>
        <ows:Value>SOS</ows:Value>
      </ows:AllowedValues>
    </ows:Parameter>
    <ows:Parameter name="version">
      <ows:AllowedValues>
        <ows:Value>2.0.0</ows:Value>
      </ows:AllowedValues>
    </ows:Parameter>
  </ows:OperationsMetadata>
  <sos:extension>
    <sos:InsertionCapabilities>
      <sos:procedureDescriptionFormat>http://www.opengis.net/sensorML/1.0.1</sos:procedureDescriptionFormat>
      <sos:procedureDescriptionFormat>http://www.opengis.net/waterml/2.0/observationProcess</sos:procedureDescriptionFormat>
      <sos:featureOfInterestType>SamplingPoint</sos:featureOfInterestType>
      <sos:featureOfInterestType>http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint</sos:featureOfInterestType>
      <sos:supportedEncoding>http://www.opengis.net/swe/2.0/TextEncoding</sos:supportedEncoding>
    </sos:InsertionCapabilities>
  </sos:extension>
  <sos:filterCapabilities>
    <fes:Filter_Capabilities>
      <fes:Spatial_Capabilities/>
      <fes:Temporal_Capabilities/>
    </fes:Filter_Capabilities>
  </sos:filterCapabilities>
  <sos:contents>
    <sos:Contents>
      <swes:offering>
        <sos:ObservationOffering xmlns:ns="http://www.opengis.net/sos/2.0">
          <swes:identifier>urn:x-sos:def:offering:x-sos::Bad_Vöslau-Airquality</swes:identifier>
          <swes:procedure>urn:x-sos:def:procedure:x-sos::Bad_Vöslau-Airquality</swes:procedure>
          <swes:procedureDescriptionFormat>http://www.opengis.net/sensorML/1.0.1</swes:procedureDescriptionFormat>
          <swes:procedureDescriptionFormat>http://www.opengis.net/waterml/2.0/observationProcess</swes:procedureDescriptionFormat>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:ozone</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:radiation</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:temperature</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:windDirection</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:windSpeedPeak</swes:observableProperty>
          <swes:relatedFeature>
            <swes:FeatureRelationship>
              <swes:role>http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SpatialSamplingFeature</swes:role>
              <swes:target xlink:href="http://edusvr218.geo.sbg.ac.at:8080/geoserver/sos/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=sos:austria&amp;outputFormat=application/json&amp;CQL_FILTER=LOCALNAME='Niederösterreich'"/>
            </swes:FeatureRelationship>
          </swes:relatedFeature>
          <sos:responseFormat>application/json</sos:responseFormat>
          <sos:responseFormat>http://www.opengis.net/om/2.0</sos:responseFormat>
          <sos:responseFormat>http://www.opengis.net/waterml-dr/2.0</sos:responseFormat>
          <sos:responseFormat>http://www.opengis.net/waterml/2.0</sos:responseFormat>
          <sos:observationType>http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement</sos:observationType>
          <sos:featureOfInterestType>http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint</sos:featureOfInterestType>
        </sos:ObservationOffering>
      </swes:offering>
      <swes:offering>
        <sos:ObservationOffering xmlns:ns="http://www.opengis.net/sos/2.0">
          <swes:identifier>urn:x-sos:def:offering:x-sos::Biedermannsdorf-Airquality</swes:identifier>
          <swes:procedure>urn:x-sos:def:procedure:x-sos::Biedermannsdorf-Airquality</swes:procedure>
          <swes:procedureDescriptionFormat>http://www.opengis.net/sensorML/1.0.1</swes:procedureDescriptionFormat>
          <swes:procedureDescriptionFormat>http://www.opengis.net/waterml/2.0/observationProcess</swes:procedureDescriptionFormat>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:nitrogenDioxide</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:nitrogenMonoxide</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:ozone</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:particulatesPm10Kont10k</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:radiation</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:temperature</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:windDirection</swes:observableProperty>
          <swes:observableProperty>urn:ogc:def:phenomenon:OGC:windSpeedPeak</swes:observableProperty>
          <swes:relatedFeature>
            <swes:FeatureRelationship>
              <swes:role>http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SpatialSamplingFeature</swes:role>
              <swes:target xlink:href="http://edusvr218.geo.sbg.ac.at:8080/geoserver/sos/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=sos:austria&amp;outputFormat=application/json&amp;CQL_FILTER=LOCALNAME='Niederösterreich'"/>
            </swes:FeatureRelationship>
          </swes:relatedFeature>
          <sos:responseFormat>application/json</sos:responseFormat>
          <sos:responseFormat>http://www.opengis.net/om/2.0</sos:responseFormat>
          <sos:responseFormat>http://www.opengis.net/waterml-dr/2.0</sos:responseFormat>
          <sos:responseFormat>http://www.opengis.net/waterml/2.0</sos:responseFormat>
          <sos:observationType>http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement</sos:observationType>
          <sos:featureOfInterestType>http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint</sos:featureOfInterestType>
        </sos:ObservationOffering>
      </swes:offering>
    </sos:Contents>
  </sos:contents>
</sos:Capabilities>

DescribeSensor

此操作返回服务提供的过程或传感器的详细说明。

请求

下面是一个DescribeSensor请求的示例,该请求在通过HTTPPOST方法发送时返回服务提供的所有过程和传感器的描述。在本例中,请求被发送到以下URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

<swes:DescribeSensor
    xmlns:swes="http://www.opengis.net/swes/2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:gml="http://www.opengis.net/gml/3.2" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/swes/2.0 http://schemas.opengis.net/swes/2.0/swes.xsd">
    <swes:procedure>http://www.52north.org/test/procedure/1</swes:procedure>
    <swes:procedureDescriptionFormat>http://www.opengis.net/sensorML/1.0.1</swes:procedureDescriptionFormat>
</swes:DescribeSensor>

This is a link to the equivalent request sent through the HTTP Get method.

响应

响应是一个XML文档,它详细描述了服务提供的传感器或过程。

<swes:DescribeSensorResponse xmlns:swes="http://www.opengis.net/swes/2.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml/3.2"
        xsi:schemaLocation="http://www.opengis.net/swes/2.0 http://schemas.opengis.net/swes/2.0/swesDescribeSensor.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/gml.xsd http://www.opengis.net/sensorML/1.0.1 http://schemas.opengis.net/sensorML/1.0.1/sensorML.xsd http://www.opengis.net/swe/1.0.1 http://schemas.opengis.net/sweCommon/1.0.1/swe.xsd">
        <swes:procedureDescriptionFormat>http://www.opengis.net/sensorML/1.0.1</swes:procedureDescriptionFormat>
        <swes:description>
                <swes:SensorDescription>
                        <swes:validTime>
                                <gml:TimePeriod gml:id="tp_EFC4679D70D0562D4184FD2890FF638639C6D274">
                                        <gml:beginPosition>2017-01-26T20:31:03.555Z</gml:beginPosition>
                                        <gml:endPosition indeterminatePosition="unknown" />
                                </gml:TimePeriod>
                        </swes:validTime>
                        <swes:data>
                                <sml:SensorML xmlns:sml="http://www.opengis.net/sensorML/1.0.1"
                                        version="1.0.1">
                                        <sml:member>
                                                <sml:System xmlns:xlink="http://www.w3.org/1999/xlink"
                                                        xmlns:gml="http://www.opengis.net/gml" xmlns:swe="http://www.opengis.net/swe/1.0.1"
                                                        xmlns:sos="http://www.opengis.net/sos/2.0">
                                                        <sml:keywords>
                                                                <sml:KeywordList>
                                                                        <sml:keyword>http://www.52north.org/test/offering/1
                                                                        </sml:keyword>
                                                                </sml:KeywordList>
                                                        </sml:keywords>
                                                        <sml:identification>
                                                                <sml:IdentifierList>
                                                                        <sml:identifier name="uniqueID">
                                                                                <sml:Term definition="urn:ogc:def:identifier:OGC:1.0:uniqueID">
                                                                                        <sml:value>http://www.52north.org/test/procedure/1
                                                                                        </sml:value>
                                                                                </sml:Term>
                                                                        </sml:identifier>
                                                                </sml:IdentifierList>
                                                        </sml:identification>
                                                        <sml:validTime>
                                                                <gml:TimePeriod>
                                                                        <gml:beginPosition>2017-01-26T20:31:03.555Z</gml:beginPosition>
                                                                        <gml:endPosition indeterminatePosition="unknown" />
                                                                </gml:TimePeriod>
                                                        </sml:validTime>
                                                        <sml:capabilities name="featuresOfInterest">
                                                                <swe:SimpleDataRecord>
                                                                        <swe:field name="featureOfInterestID">
                                                                                <swe:Text
                                                                                        definition="http://www.opengis.net/def/featureOfInterest/identifier">
                                                                                        <swe:value>http://www.52north.org/test/featureOfInterest/9
                                                                                        </swe:value>
                                                                                </swe:Text>
                                                                        </swe:field>
                                                                </swe:SimpleDataRecord>
                                                        </sml:capabilities>
                                                        <sml:capabilities name="observedBBOX">
                                                                <swe:DataRecord>
                                                                        <swe:field name="observedBBOX">
                                                                                <swe:Envelope definition="urn:ogc:def:property:OGC:1.0:observedBBOX"
                                                                                        referenceFrame="4326">
                                                                                        <swe:lowerCorner>
                                                                                                <swe:Vector>
                                                                                                        <swe:coordinate name="easting">
                                                                                                                <swe:Quantity axisID="x">
                                                                                                                        <swe:uom code="degree" />
                                                                                                                        <swe:value>7.65196881225419</swe:value>
                                                                                                                </swe:Quantity>
                                                                                                        </swe:coordinate>
                                                                                                        <swe:coordinate name="northing">
                                                                                                                <swe:Quantity axisID="y">
                                                                                                                        <swe:uom code="degree" />
                                                                                                                        <swe:value>51.9351011001049</swe:value>
                                                                                                                </swe:Quantity>
                                                                                                        </swe:coordinate>
                                                                                                </swe:Vector>
                                                                                        </swe:lowerCorner>
                                                                                        <swe:upperCorner>
                                                                                                <swe:Vector>
                                                                                                        <swe:coordinate name="easting">
                                                                                                                <swe:Quantity axisID="x">
                                                                                                                        <swe:uom code="degree" />
                                                                                                                        <swe:value>7.65196881225419</swe:value>
                                                                                                                </swe:Quantity>
                                                                                                        </swe:coordinate>
                                                                                                        <swe:coordinate name="northing">
                                                                                                                <swe:Quantity axisID="y">
                                                                                                                        <swe:uom code="degree" />
                                                                                                                        <swe:value>51.9351011001049</swe:value>
                                                                                                                </swe:Quantity>
                                                                                                        </swe:coordinate>
                                                                                                </swe:Vector>
                                                                                        </swe:upperCorner>
                                                                                </swe:Envelope>
                                                                        </swe:field>
                                                                </swe:DataRecord>
                                                        </sml:capabilities>
                                                        <sml:capabilities name="offerings">
                                                                <swe:SimpleDataRecord>
                                                                        <swe:field name="field_0">
                                                                                <swe:Text definition="http://www.opengis.net/def/offering/identifier">
                                                                                        <swe:value>http://www.52north.org/test/offering/1</swe:value>
                                                                                </swe:Text>
                                                                        </swe:field>
                                                                </swe:SimpleDataRecord>
                                                        </sml:capabilities>
                                                        <sml:contact/>
                                                        <sml:position name="sensorPosition">
                                                                <swe:Position fixed="false" referenceFrame="urn:ogc:def:crs:EPSG::4326">
                                                                        <swe:location>
                                                                                <swe:Vector>
                                                                                        <swe:coordinate name="northing">
                                                                                                <swe:Quantity axisID="y">
                                                                                                        <swe:uom code="degree" />
                                                                                                        <swe:value>51.883906</swe:value>
                                                                                                </swe:Quantity>
                                                                                        </swe:coordinate>
                                                                                        <swe:coordinate name="easting">
                                                                                                <swe:Quantity axisID="x">
                                                                                                        <swe:uom code="degree" />
                                                                                                        <swe:value>7.727958</swe:value>
                                                                                                </swe:Quantity>
                                                                                        </swe:coordinate>
                                                                                        <swe:coordinate name="altitude">
                                                                                                <swe:Quantity axisID="z">
                                                                                                        <swe:uom code="m" />
                                                                                                        <swe:value>52.0</swe:value>
                                                                                                </swe:Quantity>
                                                                                        </swe:coordinate>
                                                                                </swe:Vector>
                                                                        </swe:location>
                                                                </swe:Position>
                                                        </sml:position>
                                                        <sml:inputs>
                                                                <sml:InputList>
                                                                        <sml:input name="test_observable_property_1">
                                                                                <swe:ObservableProperty
                                                                                        definition="http://www.52north.org/test/observableProperty/1" />
                                                                        </sml:input>
                                                                </sml:InputList>
                                                        </sml:inputs>
                                                        <sml:outputs>
                                                                <sml:OutputList>
                                                                        <sml:output name="test_observable_property_1">
                                                                                <swe:Category
                                                                                        definition="http://www.52north.org/test/observableProperty/1">
                                                                                        <swe:codeSpace xlink:href="test_unit_1" />
                                                                                </swe:Category>
                                                                        </sml:output>
                                                                        <sml:output name="test_observable_property_9_1">
                                                                                <swe:Category
                                                                                        definition="http://www.52north.org/test/observableProperty/9_1">
                                                                                        <swe:codeSpace xlink:href="NOT_DEFINED" />
                                                                                </swe:Category>
                                                                        </sml:output>
                                                                        <sml:output name="test_observable_property_9_2">
                                                                                <swe:Count
                                                                                        definition="http://www.52north.org/test/observableProperty/9_2" />
                                                                        </sml:output>
                                                                        <sml:output name="test_observable_property_9_4">
                                                                                <swe:Text definition="http://www.52north.org/test/observableProperty/9_4" />
                                                                        </sml:output>
                                                                        <sml:output name="test_observable_property_9_3">
                                                                                <swe:Quantity
                                                                                        definition="http://www.52north.org/test/observableProperty/9_3">
                                                                                        <swe:uom code="NOT_DEFINED" />
                                                                                </swe:Quantity>
                                                                        </sml:output>
                                                                        <sml:output name="test_observable_property_9_5">
                                                                                <swe:Boolean
                                                                                        definition="http://www.52north.org/test/observableProperty/9_5" />
                                                                        </sml:output>
                                                                </sml:OutputList>
                                                        </sml:outputs>
                                                        <sml:components/>
                                                </sml:System>
                                        </sml:member>
                                </sml:SensorML>
                        </swes:data>
                </swes:SensorDescription>
        </swes:description>
</swes:DescribeSensorResponse>

GetObservation

此操作返回过程或传感器收集的观测数据。请求可以通过httpget或httppost发送。

请求

以下请求从具有标识符的产品中返回观察结果<http://www.52north.org/test/offering/1>. 请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

<sos:GetObservation
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:fes="http://www.opengis.net/fes/2.0"
    xmlns:gml="http://www.opengis.net/gml/3.2"
    xmlns:swe="http://www.opengis.net/swe/2.0"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:swes="http://www.opengis.net/swes/2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd">
    <sos:offering>http://www.52north.org/test/offering/1</sos:offering>
</sos:GetObservation>

响应

由上述请求得到的响应如下所示。

<sos:GetObservationResponse xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:om="http://www.opengis.net/om/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosGetObservation.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/om/2.0 http://schemas.opengis.net/om/2.0/observation.xsd">
  <sos:observationData>
    <om:OM_Observation gml:id="o_F382128D5FCE0479D86020E0A48D6AE1A9F4FCB2">
      <gml:description>test description for this observation</gml:description>
      <gml:identifier codeSpace="http://www.opengis.net/def/nil/OGC/0/unknown">http:/www.tsuruoka-nct.ac.jp/test/observation/0</gml:identifier>
      <om:type xlink:href="http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"/>
      <om:phenomenonTime>
        <gml:TimeInstant gml:id="phenomenonTime_430">
          <gml:timePosition>2012-11-19T17:45:15.000Z</gml:timePosition>
        </gml:TimeInstant>
      </om:phenomenonTime>
      <om:resultTime xlink:href="#phenomenonTime_430"/>
      <om:procedure xlink:href="http://www.tsuruoka-nct.ac.jp/test/procedure/0"/>
      <om:observedProperty xlink:href="http://www.tsuruoka-nct.ac.jp/test/observableProperty/Temperature"/>
      <om:featureOfInterest xlink:href="http://www.52north.org/test/featureOfInterest/9"/>
      <om:result xmlns:ns="http://www.opengis.net/gml/3.2" uom="test_unit_9_3" xsi:type="ns:MeasureType">0.28</om:result>
    </om:OM_Observation>
  </sos:observationData>
</sos:GetObservationResponse>

GetFeatureOfInterest

此操作返回SOS提供观测结果的相关特征的描述。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

检索感兴趣的特性的请求示例如下所示。

<sos:GetFeatureOfInterest
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:fes="http://www.opengis.net/fes/2.0"
    xmlns:gml="http://www.opengis.net/gml/3.2"
    xmlns:swe="http://www.opengis.net/swe/2.0"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:swes="http://www.opengis.net/swes/2.0" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd">
</sos:GetFeatureOfInterest>

响应

由上述请求得到的响应如下所示。

<sos:GetFeatureOfInterestResponse xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sams="http://www.opengis.net/samplingSpatial/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sf="http://www.opengis.net/sampling/2.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosGetFeatureOfInterest.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/samplingSpatial/2.0 http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd http://www.opengis.net/sampling/2.0 http://schemas.opengis.net/sampling/2.0/samplingFeature.xsd">
  <sos:featureMember xlink:href="http%3A%2F%2Fedusvr218.geo.sbg.ac.at%3A8080%2Fgeoserver%2Fsos%2Fows%3Fservice%3DWFS%26version%3D1.0.0%26request%3DGetFeature%26typeName%3Dsos%3Aaustria%26outputFormat%3Dapplication%2Fjson%26CQL_FILTER%3DLOCALNAME%3D%27Ober%C3%B6sterreich%27"/>
  <sos:featureMember>
    <sams:SF_SpatialSamplingFeature gml:id="ssf_BF81F22EFF9BA44E8FFFF909C410DCC44114CB28">
      <gml:identifier codeSpace="http://www.opengis.net/def/nil/OGC/0/unknown">http://www.52north.org/test/featureOfInterest/1</gml:identifier>
      <sf:type xlink:href="http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint"/>
      <sf:sampledFeature xlink:href="http://www.52north.org/test/featureOfInterest/world"/>
      <sams:shape>
        <ns:Point xmlns:ns="http://www.opengis.net/gml/3.2" ns:id="point_ssf_BF81F22EFF9BA44E8FFFF909C410DCC44114CB28">
          <ns:pos srsName="http://www.opengis.net/def/crs/EPSG/0/4326">51.883906 7.727958</ns:pos>
        </ns:Point>
      </sams:shape>
    </sams:SF_SpatialSamplingFeature>
  </sos:featureMember>
  <sos:featureMember>
    <sams:SF_SpatialSamplingFeature gml:id="ssf_1CCABA770D81080DA1DE0C5C3C3F0E7C4360BE52">
      <gml:identifier codeSpace="http://www.opengis.net/def/nil/OGC/0/unknown">http://www.52north.org/test/featureOfInterest/2</gml:identifier>
      <sf:type xlink:href="http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint"/>
      <sf:sampledFeature xlink:href="http://www.52north.org/test/featureOfInterest/world"/>
      <sams:shape>
        <ns:Point xmlns:ns="http://www.opengis.net/gml/3.2" ns:id="point_ssf_1CCABA770D81080DA1DE0C5C3C3F0E7C4360BE52">
          <ns:pos srsName="http://www.opengis.net/def/crs/EPSG/0/4326">34.056517 -117.195711</ns:pos>
        </ns:Point>
      </sams:shape>
    </sams:SF_SpatialSamplingFeature>
  </sos:featureMember>
  <sos:featureMember xlink:href="http://edusvr218.geo.sbg.ac.at:8080/geoserver/sos/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=sos:austria&amp;outputFormat=application/json&amp;CQL_FILTER=LOCALNAME='Steiermark'"/>
  <sos:featureMember xlink:href="http://www.52north.org/test/featureOfInterest/world"/>
  <sos:featureMember xlink:href="http://edusvr218.geo.sbg.ac.at:8080/geoserver/sos/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=sos:austria&amp;outputFormat=application/json&amp;CQL_FILTER=LOCALNAME='Niederösterreich'"/>
</sos:GetFeatureOfInterestResponse>

GetObservationById

此操作允许客户端应用程序通过传递指向该观察的指针来检索该观察。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

下面显示了通过唯一标识符检索观察值的示例请求。

<sos:GetObservationById
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd">
    <sos:observation>http:/www.tsuruoka-nct.ac.jp/test/observation/0</sos:observation>
</sos:GetObservationById>

响应

由上述请求得到的响应如下所示。

<sos:GetObservationByIdResponse xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:om="http://www.opengis.net/om/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosGetObservationById.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/om/2.0 http://schemas.opengis.net/om/2.0/observation.xsd">
  <sos:observation>
    <om:OM_Observation gml:id="o_C7AE0B68DEEEDE476BC203F558A8CC1EAF43ED71">
      <gml:description>test description for this observation</gml:description>
      <gml:identifier codeSpace="http://www.opengis.net/def/nil/OGC/0/unknown">http:/www.tsuruoka-nct.ac.jp/test/observation/0</gml:identifier>
      <om:type xlink:href="http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"/>
      <om:phenomenonTime>
        <gml:TimeInstant gml:id="phenomenonTime_430">
          <gml:timePosition>2012-11-19T17:45:15.000Z</gml:timePosition>
        </gml:TimeInstant>
      </om:phenomenonTime>
      <om:resultTime xlink:href="#phenomenonTime_430"/>
      <om:procedure xlink:href="http://www.tsuruoka-nct.ac.jp/test/procedure/0"/>
      <om:observedProperty xlink:href="http://www.tsuruoka-nct.ac.jp/test/observableProperty/Temperature"/>
      <om:featureOfInterest xlink:href="http://www.52north.org/test/featureOfInterest/9"/>
      <om:result xmlns:ns="http://www.opengis.net/gml/3.2" uom="test_unit_9_3" xsi:type="ns:MeasureType">0.28</om:result>
    </om:OM_Observation>
  </sos:observation>
</sos:GetObservationByIdResponse>

InsertSensor

此操作将在SOS中注册一个新的传感器系统。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

下面显示了在SOS中注册传感器或过程的示例请求。

<swes:InsertSensor
    xmlns:swes="http://www.opengis.net/swes/2.0"
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:swe="http://www.opengis.net/swe/1.0.1"
    xmlns:sml="http://www.opengis.net/sensorML/1.0.1"
    xmlns:gml="http://www.opengis.net/gml"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosInsertSensor.xsd   http://www.opengis.net/swes/2.0 http://schemas.opengis.net/swes/2.0/swes.xsd">
    <swes:procedureDescriptionFormat>http://www.opengis.net/sensorML/1.0.1</swes:procedureDescriptionFormat>
    <swes:procedureDescription>
        <sml:SensorML version="1.0.1">
            <sml:member>
                <sml:System>
                    <sml:identification>
                        <sml:IdentifierList>
                            <sml:identifier name="uniqueID">
                                <sml:Term definition="urn:ogc:def:identifier:OGC:1.0:uniqueID">
                                    <sml:value>http://www.52north.org/test/procedure/11</sml:value>
                                </sml:Term>
                            </sml:identifier>
                        </sml:IdentifierList>
                    </sml:identification>
                    <sml:capabilities name="offerings">
                        <swe:SimpleDataRecord>
                            <!-- Field name or gml:name is used for the offering's name -->
                            <swe:field name="Offering for sensor 11">
                                <swe:Text definition="urn:ogc:def:identifier:OGC:offeringID">
                                    <gml:name>Offering for sensor 9</gml:name>
                                    <swe:value>http://www.52north.org/test/offering/11</swe:value>
                                </swe:Text>
                            </swe:field>
                        </swe:SimpleDataRecord>
                    </sml:capabilities>
                    <sml:capabilities name="parentProcedures">
                        <!-- Special capabilities used to specify parent procedures. -->
                        <!-- Parsed and removed during InsertSensor/UpdateSensorDescription,
                                                        added during DescribeSensor. -->
                        <swe:SimpleDataRecord>
                            <swe:field name="parentProcedure">
                                <swe:Text>
                                    <swe:value>http://www.52north.org/test/procedure/1</swe:value>
                                </swe:Text>
                            </swe:field>
                        </swe:SimpleDataRecord>
                    </sml:capabilities>
                    <sml:capabilities name="featuresOfInterest">
                        <!-- Special capabilities used to specify features of interest. -->
                        <!-- Parsed and removed during InsertSensor/UpdateSensorDescription,
                                                        added during DescribeSensor. -->
                        <swe:SimpleDataRecord>
                            <swe:field name="featureOfInterestID">
                                <swe:Text>
                                    <swe:value>http://www.52north.org/test/featureOfInterest/9
                                                                        </swe:value>
                                </swe:Text>
                            </swe:field>
                        </swe:SimpleDataRecord>
                    </sml:capabilities>
                    <sml:position name="sensorPosition">
                        <swe:Position referenceFrame="urn:ogc:def:crs:EPSG::4326">
                            <swe:location>
                                <swe:Vector gml:id="STATION_LOCATION">
                                    <swe:coordinate name="easting">
                                        <swe:Quantity axisID="x">
                                            <swe:uom code="degree"/>
                                            <swe:value>7.651968812254194</swe:value>
                                        </swe:Quantity>
                                    </swe:coordinate>
                                    <swe:coordinate name="northing">
                                        <swe:Quantity axisID="y">
                                            <swe:uom code="degree"/>
                                            <swe:value>51.935101100104916</swe:value>
                                        </swe:Quantity>
                                    </swe:coordinate>
                                    <swe:coordinate name="altitude">
                                        <swe:Quantity axisID="z">
                                            <swe:uom code="m"/>
                                            <swe:value>52.0</swe:value>
                                        </swe:Quantity>
                                    </swe:coordinate>
                                </swe:Vector>
                            </swe:location>
                        </swe:Position>
                    </sml:position>
                    <sml:inputs>
                        <sml:InputList>
                            <sml:input name="test_observable_property_9">
                                <swe:ObservableProperty definition="http://www.52north.org/test/observableProperty/9"/>
                            </sml:input>
                        </sml:InputList>
                    </sml:inputs>
                    <sml:outputs>
                        <sml:OutputList>
                            <sml:output name="test_observable_property_9_1">
                                <swe:Category definition="http://www.52north.org/test/observableProperty/9_1">
                                    <swe:codeSpace xlink:href="NOT_DEFINED"/>
                                </swe:Category>
                            </sml:output>
                        </sml:OutputList>
                    </sml:outputs>
                </sml:System>
            </sml:member>
        </sml:SensorML>
    </swes:procedureDescription>
    <!-- multiple values possible -->
    <swes:observableProperty>http://www.52north.org/test/observableProperty/9_1</swes:observableProperty>
    <swes:metadata>
        <sos:SosInsertionMetadata>
            <sos:observationType>http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement</sos:observationType>
            <sos:observationType>http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation</sos:observationType>
            <sos:observationType>http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CountObservation</sos:observationType>
            <!-- multiple values possible -->
            <sos:featureOfInterestType>http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint</sos:featureOfInterestType>
        </sos:SosInsertionMetadata>
    </swes:metadata>
</swes:InsertSensor>

响应

由上述请求得到的响应如下所示。

<swes:InsertSensorResponse xmlns:swes="http://www.opengis.net/swes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/swes/2.0 http://schemas.opengis.net/swes/2.0/swesInsertSensor.xsd">
  <swes:assignedProcedure>http://www.52north.org/test/procedure/11</swes:assignedProcedure>
  <swes:assignedOffering>http://www.52north.org/test/offering/11</swes:assignedOffering>
</swes:InsertSensorResponse>

DeleteSensor

此操作将从SOS中删除一个新的传感器系统。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

从SOS中删除传感器或程序的请求示例如下所示。

<swes:DeleteSensor
    xmlns:swes="http://www.opengis.net/swes/2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/swes/2.0 http://schemas.opengis.net/swes/2.0/swes.xsd">
    <swes:procedure>http://www.52north.org/test/procedure/11</swes:procedure>
</swes:DeleteSensor>

响应

由上述请求得到的响应如下所示。

<swes:DeleteSensorResponse xmlns:swes="http://www.opengis.net/swes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/swes/2.0 http://schemas.opengis.net/swes/2.0/swesDeleteSensor.xsd">
  <swes:deletedProcedure>http://www.52north.org/test/procedure/11</swes:deletedProcedure>
</swes:DeleteSensorResponse>

InsertObservation

一个新的客户端操作允许插入新的传感器操作。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

将观察插入SOS的示例请求如下所示。

<sos:InsertObservation
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:swes="http://www.opengis.net/swes/2.0"
    xmlns:swe="http://www.opengis.net/swe/2.0"
    xmlns:sml="http://www.opengis.net/sensorML/1.0.1"
    xmlns:gml="http://www.opengis.net/gml/3.2"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:om="http://www.opengis.net/om/2.0"
    xmlns:sams="http://www.opengis.net/samplingSpatial/2.0"
    xmlns:sf="http://www.opengis.net/sampling/2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd          http://www.opengis.net/samplingSpatial/2.0 http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd">
    <!-- multiple offerings are possible -->
    <sos:offering>http://www.52north.org/test/offering/9</sos:offering>
    <sos:observation>
        <om:OM_Observation gml:id="o1">
            <gml:description>test description for this observation</gml:description>
            <gml:identifier codeSpace="">http://www.52north.org/test/observation/10</gml:identifier>
            <om:type xlink:href="http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"/>
            <om:phenomenonTime>
                <gml:TimeInstant gml:id="phenomenonTime">
                    <gml:timePosition>2017-07-31T17:45:15.000+00:00</gml:timePosition>
                </gml:TimeInstant>
            </om:phenomenonTime>
            <om:resultTime xlink:href="#phenomenonTime"/>
            <om:procedure xlink:href="http://www.52north.org/test/procedure/9"/>
            <om:observedProperty xlink:href="http://www.52north.org/test/observableProperty/9_3"/>
            <om:featureOfInterest>
                <sams:SF_SpatialSamplingFeature gml:id="ssf_test_feature_9">
                    <gml:identifier codeSpace="">http://www.52north.org/test/featureOfInterest/9</gml:identifier>
                    <gml:name>52°North</gml:name>
                    <sf:type xlink:href="http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint"/>
                    <sf:sampledFeature xlink:href="http://www.52north.org/test/featureOfInterest/1"/>
                    <sams:shape>
                        <gml:Point gml:id="test_feature_9">
                            <gml:pos srsName="http://www.opengis.net/def/crs/EPSG/0/4326">51.935101100104916 7.651968812254194</gml:pos>
                        </gml:Point>
                    </sams:shape>
                </sams:SF_SpatialSamplingFeature>
            </om:featureOfInterest>
            <om:result xsi:type="gml:MeasureType" uom="test_unit_9_3">0.28</om:result>
        </om:OM_Observation>
    </sos:observation>
</sos:InsertObservation>

响应

由上述请求得到的响应如下所示。

<sos:InsertObservationResponse xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosInsertObservation.xsd"/>

InsertResultTemplate

此操作允许客户端应用程序上载结果值的模板,以便使用InsertResult操作的后续调用将符合模板的结果值插入到SOS中。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

将结果模板上载到SOS的示例如下所示。

<sos:InsertResultTemplate
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:swes="http://www.opengis.net/swes/2.0"
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:swe="http://www.opengis.net/swe/2.0"
    xmlns:sml="http://www.opengis.net/sensorML/1.0.1"
    xmlns:gml="http://www.opengis.net/gml/3.2"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:om="http://www.opengis.net/om/2.0"
    xmlns:sams="http://www.opengis.net/samplingSpatial/2.0"
    xmlns:sf="http://www.opengis.net/sampling/2.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosInsertResultTemplate.xsd http://www.opengis.net/om/2.0 http://schemas.opengis.net/om/2.0/observation.xsd  http://www.opengis.net/samplingSpatial/2.0 http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd">
    <sos:proposedTemplate>
        <!-- Before using this example, make sure that all preconditions are fulfilled,
                        e.g. perform InsertSensor example. -->
        <sos:ResultTemplate>
            <swes:identifier>http://www.52north.org/test/procedure/9/template/11</swes:identifier>
            <sos:offering>http://www.52north.org/test/offering/11</sos:offering>
            <sos:observationTemplate>
                <om:OM_Observation gml:id="sensor2obsTemplate">
                    <om:type xlink:href="http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"/>
                    <om:phenomenonTime nilReason="template"/>
                    <om:resultTime nilReason="template"/>
                    <om:procedure xlink:href="http://www.52north.org/test/procedure/11"/>
                    <om:observedProperty xlink:href="http://www.52north.org/test/observableProperty/9_3"/>
                    <om:featureOfInterest>
                        <sams:SF_SpatialSamplingFeature gml:id="sf_test_feature_9">
                            <gml:identifier codeSpace="">http://www.52north.org/test/featureOfInterest/9</gml:identifier>
                            <gml:name>52°North</gml:name>
                            <sf:type xlink:href="http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint"/>
                            <sf:sampledFeature xlink:href="http://www.opengis.net/def/nil/OGC/0/unknown"/>
                            <sams:shape>
                                <gml:Point gml:id="point_sf_test_feature_9">
                                    <gml:pos srsName="http://www.opengis.net/def/crs/EPSG/0/4326">51.935101100104916 7.651968812254194</gml:pos>
                                </gml:Point>
                            </sams:shape>
                        </sams:SF_SpatialSamplingFeature>
                    </om:featureOfInterest>
                    <om:result/>
                </om:OM_Observation>
            </sos:observationTemplate>
            <sos:resultStructure>
                <swe:DataRecord>
                    <swe:field name="phenomenonTime">
                        <swe:Time definition="http://www.opengis.net/def/property/OGC/0/PhenomenonTime">
                            <swe:uom xlink:href="http://www.opengis.net/def/uom/ISO-8601/0/Gregorian"/>
                        </swe:Time>
                    </swe:field>
                    <swe:field name="test_observable_property_9">
                        <swe:Quantity definition="http://www.52north.org/test/observableProperty/9_3">
                            <swe:uom code="test_unit_1"/>
                        </swe:Quantity>
                    </swe:field>
                </swe:DataRecord>
            </sos:resultStructure>
            <sos:resultEncoding>
                <swe:TextEncoding tokenSeparator="#" blockSeparator="@"/>
            </sos:resultEncoding>
        </sos:ResultTemplate>
    </sos:proposedTemplate>
</sos:InsertResultTemplate>

响应

由上述请求得到的响应如下所示。

<sos:InsertResultTemplateResponse xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosInsertResultTemplate.xsd">
  <sos:acceptedTemplate>http://www.52north.org/test/procedure/9/template/11</sos:acceptedTemplate>
</sos:InsertResultTemplateResponse>

InsertResult

此操作允许客户端应用程序通过仅插入观测结果并重用模板提供的其他元数据来为传感器系统插入新的观测值。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

插入观察结果的示例请求如下所示。

<sos:InsertResult
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd">
    <sos:template>http://www.52north.org/test/procedure/9/template/11</sos:template>
    <sos:resultValues>15@2012-11-19T13:30:00+02:00#159.15@2012-11-19T13:31:00+02:00#159.15@2012-11-19T13:32:00+02:00#159.85@2012-11-19T13:33:00+02:00#160.5@2012-11-19T13:34:00+02:00#160.9@2012-11-19T13:35:00+02:00#160.7@2012-11-19T13:36:00+02:00#160.5@2012-11-19T13:37:00+02:00#160.6@2012-11-19T13:38:00+02:00#160.5@2012-11-19T13:39:00+02:00#160.4@2012-11-19T13:40:00+02:00#160.34@2012-11-19T13:41:00+02:00#160.25@2012-11-19T13:42:00+02:00#159.79@2012-11-19T13:43:00+02:00#159.56@2012-11-19T13:44:00+02:00#159.25@</sos:resultValues>
</sos:InsertResult>

响应

由上述请求得到的响应如下所示。

<sos:InsertResultResponse xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosInsertResult.xsd"/>

GetResultTemplate

此操作返回一个结果模板,该模板描述特定过程或传感器用于生成新观测结果的确切结构。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

下面显示了检索结果模板的示例请求。

<sos:GetResultTemplate
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd">
    <sos:offering>http://www.52north.org/test/offering/11</sos:offering>
    <sos:observedProperty>http://www.52north.org/test/observableProperty/9_3</sos:observedProperty>
</sos:GetResultTemplate>

响应

由上述请求得到的响应如下所示。

<sos:GetResultTemplateResponse xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/swes/2.0 http://schemas.opengis.net/swes/2.0/swes.xsd http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosGetResultTemplate.xsd">
  <sos:resultStructure>
    <swe:DataRecord xmlns:swes="http://www.opengis.net/swes/2.0" xmlns:sml="http://www.opengis.net/sensorML/1.0.1" xmlns:om="http://www.opengis.net/om/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sf="http://www.opengis.net/sampling/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:swe="http://www.opengis.net/swe/2.0" xmlns:sams="http://www.opengis.net/samplingSpatial/2.0">
      <swe:field name="phenomenonTime">
        <swe:Time definition="http://www.opengis.net/def/property/OGC/0/PhenomenonTime">
          <swe:uom xlink:href="http://www.opengis.net/def/uom/ISO-8601/0/Gregorian"/>
        </swe:Time>
      </swe:field>
      <swe:field name="test_observable_property_9">
        <swe:Quantity definition="http://www.52north.org/test/observableProperty/9_3">
          <swe:uom code="test_unit_1"/>
        </swe:Quantity>
      </swe:field>
    </swe:DataRecord>
  </sos:resultStructure>
  <sos:resultEncoding>
    <swe:TextEncoding xmlns:swes="http://www.opengis.net/swes/2.0" xmlns:sml="http://www.opengis.net/sensorML/1.0.1" xmlns:om="http://www.opengis.net/om/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sf="http://www.opengis.net/sampling/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:swe="http://www.opengis.net/swe/2.0" xmlns:sams="http://www.opengis.net/samplingSpatial/2.0" tokenSeparator="#" blockSeparator="@"/>
  </sos:resultEncoding>
</sos:GetResultTemplateResponse>

GetResult

此操作允许只检索观察结果值,而不检索观察的整个元数据。请求通过httppost发送到URL<http://sensorweb.demo.52north.org/52n-sos-webapp/service>。

请求

检索观测结果值的请求示例如下所示。

<sos:GetResult
    xmlns:sos="http://www.opengis.net/sos/2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="SOS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd">
    <sos:offering>http://www.52north.org/test/offering/11</sos:offering>
    <sos:observedProperty>http://www.52north.org/test/observableProperty/9_3</sos:observedProperty>
</sos:GetResult>

响应

由上述请求得到的响应如下所示。

<sos:GetResultResponse xmlns:sos="http://www.opengis.net/sos/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sosGetResult.xsd">
  <sos:resultValues xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">15@2012-11-19T11:30:00.000Z#159.15@2012-11-19T11:31:00.000Z#159.15@2012-11-19T11:32:00.000Z#159.85@2012-11-19T11:33:00.000Z#160.5@2012-11-19T11:34:00.000Z#160.9@2012-11-19T11:35:00.000Z#160.7@2012-11-19T11:36:00.000Z#160.5@2012-11-19T11:37:00.000Z#160.6@2012-11-19T11:38:00.000Z#160.5@2012-11-19T11:39:00.000Z#160.4@2012-11-19T11:40:00.000Z#160.34@2012-11-19T11:41:00.000Z#160.25@2012-11-19T11:42:00.000Z#159.79@2012-11-19T11:43:00.000Z#159.56@2012-11-19T11:44:00.000Z#159.25</sos:resultValues>
</sos:GetResultResponse>

例外情况

当客户机向SOS服务器发出的请求未正确执行时,服务器需要报告异常。如果发生异常,服务器将返回包含异常详细信息的报告。

以下异常报告是将不受支持的产品的请求发送到服务器时返回的内容的示例。

<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsAll.xsd">
  <ows:Exception exceptionCode="InvalidParameterValue" locator="offering">
    <ows:ExceptionText>The value 'http://www.52north.org/test/offering/999' of the parameter 'offering' is invalid</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>