You are here: Wiki>SensorWeb Web>SensorPlanningService>SpsExamplePage (09 Mar 2006, JohannesEchterhoff)Edit Attach
-- JohannesEchterhoff - 08 Nov 2005

IFGI-SPS

Note: This site describes the status of implementation and SPS specification for the time of the OWS-3 demo. It does not reflect the current implementation yet.

Foreword

Here you will find informations about the SPS implemented for OWS-3 at IFGI. If you would like to test our service then you may find valuable informations here.

Contents

SPS

Usage

Getting informations from the Capabilities

The Capabilities-document contains informations about:
  • which sensors are available
  • what phenomenon is measured by each sensor
  • where the SensorML-description can be obtained
  • in what area or location a sensor can operate.

Getting informations about the taskeable parameters

Use the DescribeCollection-operation to find out which parameters can be used when submitting and updating a task. The result also contains a narrative description of each parameter.

Submitting a task

If you want to submit a task then:
  • You can deliver a task-start-time that begins in the past as long as the task-end-time is in the future. This will give you instant access to the camera. Of course it is possible to submit a task which begins in the future as long as the task-end-time is not before the task-start-time.
  • The duration of a task currently can be one hour (this can be altered to any duration you want). So if you want to use Update-, GetStatus- and Cancel-request you should submit a task that lasts longer than a few seconds. Because otherwise you would not have a chance to issue these commands.
  • It may be the case that there already is a submitted task which would overlap in time with the task you try to submit. You might want to test this behaviour - if so, then after having submitted a task, just try to submit a second one which overlaps in time.
  • If you issued a feasibility-request for testing the feasibility of an intended task and the task is feasible then you can use the feasibility-ID when submitting the task. The IFGI-SPS caches each feasibility-request which was feasible for a duration of twelve hours (this parameter can be set to any duration you want - in addition you can limit the number of cached requests). You can find an example-request that uses the feasibility-ID in a SubmitRequest in the 'Example-Requests'-section.
  • For submitting and updating using parameter 'gotoserverpresetname':
    • This parameter issues a command that is exclusive. That means that all other parameters you send with the same request do not have any effect. So better issue a request that contains only 'gotoserverpresetname' with value 'floor1' or 'floor2' if you are using this parameter.

Updating a task

Issuing update-requests:
  • If the operation is not implemented at the client side, then you should use the parameter 'rpan', 'rtilt', 'rzoom' and/or 'speed' (which controls movement-speed of the camera – 1=very slow, 100=very fast) without using 'gotoserverpresetname' because it might be the case that the camera already is in position 'floor1' or 'floor2'.
  • If it is implemented at the client side, then you might just use 'floor1' or 'floor2' - the parameter you did not use for submitting. Then you should see real movement of the camera.

Cancelling a task

Using the cancel-operation:
  • You might want to use this operation to show two things:
    • If you cancel a task that would otherwise last for a longer time, say for another 30 minutes, then you can submit a new task which otherwise would not be feasible (because it would have overlapped in time with the ongoing task). Using cancel-request can free resources that otherwise would be occupied unnecessarily
    • If you cancel a task then using the update-operation for this task is no longer possible. Using cancel-request you clearly show that you do no longer want to use the sensor (this command can also be issued before a task really starts - would be helpful for saving money if using a sensor costs money)

Example-Requests

Note: remember to update informations like WNS-ID and WNS-URL or TaskID If you want to use these requests.

GetCapabilitiesRequest
<?xml version="1.0" encoding="UTF-8"?>
<GetCapabilities xmlns="http://www.opengis.net/sps" xmlns:ogc="http://www.opengis.net/ogc" 
xmlns:ows="http://www.opengeospatial.net/ows" service="SPS"/> 
DescribeCollectionRequest
<?xml version="1.0" encoding="UTF-8"?>
<DescribeCollectionRequest xmlns="http://www.opengis.net/sps">
   <sensorID>urn:ogc:object:feature:Sensor:IFGI:ifgicam01</sensorID>
</DescribeCollectionRequest>
GetFeasibilityRequest
<?xml version="1.0" encoding="UTF-8"?>
<GetFeasibilityRequest xmlns="http://www.opengis.net/sps" xmlns:gml="http://www.opengis.net/gml" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <notificationTarget>
      <notificationID>_your wns id_</notificationID>
      <notificationURL>_your wns url_</notificationURL>
   </notificationTarget>
   <sensorID>urn:ogc:object:feature:Sensor:IFGI:ifgicam01</sensorID>
   <parameters>
      <InputParameter parameterID="gotoserverpresetname">
         <value>floor1</value>
      </InputParameter>      
      <InputParameter parameterID="task-start-time">
         <value>2005-11-08T16:25:00+01:00</value>
      </InputParameter>
      <InputParameter parameterID="task-end-time">
         <value>2005-11-08T16:30:00+01:00</value>
      </InputParameter>
   </parameters>
   <timeFrame>
      <!-- the IFGI SPS currently ignores this parameter, so you do not have to alter anything -->
      <gml:TimeInstant>
         <gml:timePosition>2005-10-05T12:00:00</gml:timePosition>
      </gml:TimeInstant>
   </timeFrame>
</GetFeasibilityRequest>
SubmitRequest

Use a request like the following if you have already performed a GetFeasibilityRequest and that request was feasible. This is only a shortcut to avoid transmitting the same informations again. Note that the SubmitRequest might not be feasible although the GetFeasibilityRequest was, due to unpredictable conditions (e.g. another task has been submitted in the meantime and is blocking the intended time-interval).

<?xml version="1.0" encoding="UTF-8"?>
<SubmitRequest xmlns="http://www.opengis.net/sps" xmlns:gml="http://www.opengis.net/gml" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <notificationTarget>
      <notificationID>_your wns id_</notificationID>
      <notificationURL>_your wns url_</notificationURL>
   </notificationTarget>
   <sensorID>urn:ogc:object:feature:Sensor:IFGI:ifgicam01</sensorID>
   <feasibilityID>_your feasibilityID_</feasibilityID>
   <timeFrame>
      <!-- the IFGI SPS currently ignores this parameter, so you do not have to alter anything -->
      <gml:TimeInstant>
         <gml:timePosition>2005-10-05T12:00:00</gml:timePosition>
      </gml:TimeInstant>
   </timeFrame>
</SubmitRequest>

Use a request like the following if you did not perform a GetFeasibilityRequest beforehand.

<?xml version="1.0" encoding="UTF-8"?>
<SubmitRequest xmlns="http://www.opengis.net/sps" xmlns:gml="http://www.opengis.net/gml" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <notificationTarget>
      <notificationID>_your wns id_</notificationID>
      <notificationURL>_your wns url_</notificationURL>
   </notificationTarget>
   <sensorID>urn:ogc:object:feature:Sensor:IFGI:ifgicam01</sensorID>
   <parameters>
      <InputParameter parameterID="gotoserverpresetname">
         <value>floor1</value>
      </InputParameter>      
      <InputParameter parameterID="task-start-time">
         <value>2005-11-08T16:25:00+01:00</value>
      </InputParameter>
      <InputParameter parameterID="task-end-time">
         <value>2005-11-08T16:30:00+01:00</value>
      </InputParameter>
   </parameters>
   <timeFrame>
      <!-- the IFGI SPS currently ignores this parameter, so you do not have to alter anything -->
      <gml:TimeInstant>
         <gml:timePosition>2005-10-05T12:00:00</gml:timePosition>
      </gml:TimeInstant>
   </timeFrame>
</SubmitRequest>
UpdateRequest
<?xml version="1.0" encoding="UTF-8"?>
<UpdateRequest xmlns="http://www.opengis.net/sps" xmlns:gml="http://www.opengis.net/gml">
   <taskID>_your taskID_</taskID>
   <parameters>
      <InputParameter parameterID="gotoserverpresetname">
         <value>floor2</value>
      </InputParameter>
   </parameters>
</UpdateRequest>
GetStatusRequest
<?xml version="1.0" encoding="UTF-8"?>
<GetStatusRequest xmlns="http://www.opengis.net/sps">
   <taskID>_your taskID_</taskID>
</GetStatusRequest>
Cancel-Request
<?xml version="1.0" encoding="UTF-8"?>
<CancelRequest xmlns="http://www.opengis.net/sps">
   <taskID>your_task_ID</taskID>
</CancelRequest>

service URL: http://mars.uni-muenster.de:8080/52nSPS/sps

test-pages for each SPS-operation:

The test-pages already contain example requests but remember to insert your correct WNS-ID and –URL as well as the correct Task-ID when testing operations.
operationSorted ascending link
DescribeCollection http://mars.uni-muenster.de:8080/52nSPS/spsTestClient_DCR.html
GetCapabilities http://mars.uni-muenster.de:8080/52nSPS/spsTestClient_GCR.html
GetFeasibility http://mars.uni-muenster.de:8080/52nSPS/spsTestClient_GFR.html
GetStatus http://mars.uni-muenster.de:8080/52nSPS/spsTestClient_GSR.html
Cancel http://mars.uni-muenster.de:8080/52nSPS/spsTestClient_CR.html
Submit http://mars.uni-muenster.de:8080/52nSPS/spsTestClient_SR.html
Update http://mars.uni-muenster.de:8080/52nSPS/spsTestClient_UR.html

UPDATE

The IFGI-SPS client (Java Webstart) is much more intuitive. Try it and do not forget to insert your notification ID!


WNS

Usage

The WNS is used to inform you about events. For the IFGI-SPS this means that the SPS sends a notification to you via the notifcation-target (i.e. WNS-ID and -URL) you provided. Notifications are sent when a task is submitted successfully, when the task begins and when the task is finished or cancelled.

Example-Requests

Registering for E-Mail-Notifications:
<?xml version="1.0" encoding="UTF-8"?>
<RegisterUser xmlns="http://www.opengis.net/wns" Version="0.0.1" Service="WNS">
   <Name>your name</Name>
   <CommunicationProtocol>
      <email>your_e-mail-address</email>
   </CommunicationProtocol>
</RegisterUser>
Registering for TCP-Notifications:

If you want to register for notifications sent via sockets then use a request like the following (at SocketWNS):
<?xml version="1.0" encoding="UTF-8"?> 
   <RegisterUser xmlns="http://www.opengis.net/wns" Version="0.0.1" Service="WNS"> 
   <Name>your_name</Name> 
   <CommunicationProtocol> 
      <url>socket://your_host:your_port</url> 
   </CommunicationProtocol> 
</RegisterUser>
Example-Notification:

Send this request to the WNS with the ID you received while registering at the WNS:
<?xml version="1.0" encoding="UTF-8"?>
<DoNotification Version="0.0.1" Service="WNS">
   <UserID></UserID>
   <Message>
      <Type>New data available</Type>
      <MessageParameter>
         <CorrID>2147483647</CorrID>
         <Key>You can retrieve the data at</Key>
         <URI>http://ifgi.uni-muenster.de</URI>
      </MessageParameter>
   </Message>
</DoNotification>
Service Service-URL test-page
WNS http://mars.uni-muenster.de:8080/WNS/wns http://mars.uni-muenster.de:8080/WNS/wnsTestClient.html
SocketWNS - WNS that can use direct TCP-communication (via Java-Sockets) http://mars.uni-muenster.de:8080/SocketWNS/WNS http://mars.uni-muenster.de:8080/SocketWNS/wnsTestClient.html


Camera

At the moment the camera's video-stream can be viewed at http://ifgicam.uni-muenster.de. If username and password are needed send a mail to simonis@uni-muenster.de that points out how long you need access to the video-stream together with the estimated use (e.g. OWS-3 demo purposes) and you will receive a temporary access authorization.

-- JohannesEchterhoff - 09 Mar 2006
Topic revision: r3 - 09 Mar 2006, JohannesEchterhoff
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback