Sensor Observation Service (SOS)
Revision as of 16:51, 5 February 2014 by Ptagliolato (Talk | contribs)
Server SOS utilizzato: 52North versione 3.2 (NOTA: implementa versione OGC SOS 1.0.0 - cf. Arthur Na (IRIS Corp.), Mark Priest (3eTI) OGC 06-009r6.)
Prerequisiti: postgres fino <= 9.0, postgis <= 1.5
...
Contents
Esempi di requests validati:
Registrazione di sensori (RegisterSensor)
<?xml version="1.0" encoding="UTF-8"?> <RegisterSensor service="SOS" version="1.0.0" xmlns="http://www.opengis.net/sos/1.0" xmlns:swe="http://www.opengis.net/swe/1.0.1" xmlns:ows="http://www.opengeospatial.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:om="http://www.opengis.net/om/1.0" xmlns:sml="http://www.opengis.net/sensorML/1.0.1" 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/sosRegisterSensor.xsd http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/extensions/observationSpecialization_override.xsd"> <SensorDescription> <sml:SensorML version="1.0.1"> <sml:member> <sml:System xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <sml:identification> <sml:IdentifierList> <sml:identifier> <sml:Term definition="urn:ogc:def:identifier:OGC:uniqueID"> <sml:value>urn:ogc:object:feature:Sensor:SI001137-P06:CP</sml:value> </sml:Term> </sml:identifier> </sml:IdentifierList> </sml:identification> <sml:capabilities> <swe:SimpleDataRecord> <swe:field name="status"> <swe:Boolean> <swe:value>true</swe:value> </swe:Boolean> </swe:field> <swe:field name="mobile"> <swe:Boolean> <swe:value>true</swe:value> </swe:Boolean> </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> <swe:uom code="degree"/> <swe:value>8.65647</swe:value> </swe:Quantity> </swe:coordinate> <swe:coordinate name="northing"> <swe:Quantity> <swe:uom code="degree"/> <swe:value>45.96648</swe:value> </swe:Quantity> </swe:coordinate> <swe:coordinate name="altitude"> <swe:Quantity> <swe:uom code="m"/> <swe:value>194.0</swe:value> </swe:Quantity> </swe:coordinate> </swe:Vector> </swe:location> </swe:Position> </sml:position> <sml:inputs> <sml:InputList> <sml:input name="CPIn"> <swe:ObservableProperty definition="urn:ogc:def:property:OGC:1.0.30:CP_in"/> </sml:input> <sml:input name="CPPressureIn"> <swe:ObservableProperty definition="urn:ogc:def:property:OGC:1.0.30:CP_pressure_in"/> </sml:input> </sml:InputList> </sml:inputs> <sml:outputs> <sml:OutputList> <sml:output name="CP"> <swe:Quantity definition="urn:ogc:def:property:OGC:1.0.30:CP"> <gml:metaDataProperty><offering><id>CP</id><name>Chlorophyll</name></offering></gml:metaDataProperty> <swe:uom code="ug/l"/> </swe:Quantity> </sml:output> <sml:output name="Depth"> <swe:Quantity definition="urn:ogc:def:property:OGC:1.0.30:pressure"> <gml:metaDataProperty> <offering> <id>CP</id><name>Depth</name> </offering> </gml:metaDataProperty> <swe:uom code="m"/> </swe:Quantity> </sml:output> </sml:OutputList> </sml:outputs> </sml:System> </sml:member> </sml:SensorML> </SensorDescription>
<ObservationTemplate> <om:Observation> <om:samplingTime></om:samplingTime> <om:procedure></om:procedure> <om:observedProperty></om:observedProperty> <om:featureOfInterest></om:featureOfInterest> <om:result></om:result> </om:Observation> </ObservationTemplate> </RegisterSensor>
Inserimento di osservazioni (InsertObservation)
<?xml version="1.0"?> <InsertObservation xsi:schemaLocation="http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosInsert.xsd http://www.opengis.net/sampling/1.0 http://schemas.opengis.net/sampling/1.0.0/sampling.xsd http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/extensions/observationSpecialization_override.xsd" service="SOS" version="1.0.0"xmlns="http://www.opengis.net/sos/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:ogc="http://www.opengis.net/ogc" xmlns:om="http://www.opengis.net/om/1.0" xmlns:sos="http://www.opengis.net/sos/1.0" xmlns:sa="http://www.opengis.net/sampling/1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:swe="http://www.opengis.net/swe/1.0.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AssignedSensorId>urn:ogc:object:feature:Sensor:SI001137-P06:CP</AssignedSensorId> <om:Observation> <om:samplingTime> <gml:TimePeriod xsi:type="gml:TimePeriodType"> <gml:beginPosition>1981-01-15T10:02:00+01</gml:beginPosition> <gml:endPosition>2011-12-15T10:02:00+01</gml:endPosition> </gml:TimePeriod> </om:samplingTime> <om:procedure xlink:href="urn:ogc:object:feature:Sensor:SI001137-P06:CP"/> <om:observedProperty> <swe:CompositePhenomenon gml:id="cpid0" dimension="1"> <gml:name>resultComponents</gml:name> <swe:component xlink:href="urn:ogc:data:time:iso8601"/> <swe:component xlink:href="urn:ogc:def:property:OGC:1.0.30:CP"/> <swe:component xlink:href="urn:ogc:def:property:OGC:1.0.30:pressure"/> </swe:CompositePhenomenon> </om:observedProperty> <om:featureOfInterest> <sa:SamplingPoint gml:id="SI001137-P06"> <gml:name>SI001137-P06</gml:name> <sa:sampledFeature xlink:href=""/> <sa:position> <gml:Point> <gml:pos srsName="urn:ogc:def:crs:EPSG::4326">45.96648 8.65647</gml:pos> </gml:Point> </sa:position> </sa:SamplingPoint> </om:featureOfInterest> <om:result> <swe:DataArray> <swe:elementCount> <swe:Count> <swe:value>2</swe:value> </swe:Count> </swe:elementCount> <swe:elementType name="Components"> <swe:DataRecord> <swe:field name="Time"> <swe:Time definition="urn:ogc:data:time:iso8601"/> </swe:field> <swe:field name="feature"> <swe:Text definition="urn:ogc:data:feature"/> </swe:field> <swe:field name="CP"> <swe:Quantity definition="urn:ogc:def:property:OGC:1.0.30:CP"> <swe:uom code="ug/l"/> </swe:Quantity> </swe:field> <swe:field name="Depth"> <swe:Quantity definition="urn:ogc:def:property:OGC:1.0.30:pressure"> <swe:uom code="m"/> </swe:Quantity> </swe:field> </swe:DataRecord> </swe:elementType> <swe:encoding> <swe:TextBlock decimalSeparator="." tokenSeparator="," blockSeparator=";"/> </swe:encoding> <swe:values>1997-12-15T10:02:00+01,SI001137-P06,0.83,-10;1991-05-15T10:02:00+01,SI001137-P06,6.03,-10;</swe:values> </swe:DataArray> </om:result> </om:Observation> </InsertObservation>