Trying to implement a SOS for the first time

Hinrich Paulsen paulsen at TERRESTRIS.DE
Thu Sep 28 09:52:40 EDT 2006


Kralidis,Tom [Burlington] schrieb:

>>-----Original Message-----
>>From: UMN MapServer Users List 
>>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Hinrich Paulsen
>>Sent: Wednesday, September 27, 2006 9:25 AM
>>To: MAPSERVER-USERS at LISTS.UMN.EDU
>>Subject: [UMN_MAPSERVER-USERS] Trying to implement a SOS for 
>>the first time
>>
>>Dear List,
>>
>>posting to this list for the first time and am promptly 
>>rejected by the system. Hopefully it is not an omen. :-) 
>>Well, here is my question again.
>> 
>>
>>Dear List,
>>
>>I am in the process of setting up a Sensor Observation 
>>Service (SOS) for the first time using a Kubuntu-Linux 
>>machine and the following Mapserver:
>>
>>MapServer version 4.10.0-beta3 OUTPUT=GIF OUTPUT=PNG 
>>OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ 
>>SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
>>SUPPORTS=WFS_SERVER SUPPORTS=SOS_SERVER INPUT=EPPL7 
>>INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE 
>>
>>My data is sitting in a Postgis table which I can easily 
>>access via WMS.
>>
>>I have consulted the documentation at:
>>http://mapserver.gis.umn.edu/docs/howto/sos_server/
>>
>>and when trying out the examples given there the  
>>GetCapabilities and  DescribeSensor Requests work fine so far 
>>but the GetObservation Request does not.
>>
>>My idea of how the GetObservation Request should work is that 
>>data in a specific column in my Postgis table is returned 
>>when I define it in my SOS server mapfile. Here is a snippet 
>>of the mapfile:
>>
>><SNIP>
>>
>>LAYER
>>  NAME test_sos_layer
>>  DUMP TRUE
>>  METADATA
>>    "sos_procedure"  "SW01UTL001"                             
>>                           ## REQUIRED
>>    "sos_offering_id" "r_wert"                                
>>                                    ## REQUIRED
>>    "sos_observedproperty_id" "r_wert"                        
>>                            ## REQUIRED
>>    "sos_describesensor_url" 
>>"http://localhost/temp/SW01UTL001.xml"   ## REQUIRED 
>>  END
>>  TYPE POINT
>>  STATUS ON
>>
>>  CONNECTIONTYPE postgis
>>  CONNECTION "user=myuser dbname=mydb host=localhost port=5432"
>>  DATA "the_geom FROM (SELECT * FROM mytable) AS foo USING 
>>UNIQUE gid USING SRID=31467"
>>
>>   PROJECTION
>>     	'init=epsg:31467'
>>   END
>>
>> CLASS
>>    NAME 'r_wert'
>>       STYLE
>>        SYMBOL 'circle'
>>        SIZE 5
>>        COLOR 255 100 50
>>        OUTLINECOLOR 0 0 0
>>      END
>> END
>>END
>>
>></SNIP>
>>
>>When I send this there is no error but all I get back is this:
>><om:ObservationCollection gml:id="r_wert" 
>>xsi:schemaLocation="http://www.opengeospatial.net/om 
>>http://schemas.opengis.net/om.xsd"/>
>>
>>Where am I going wrong? Any help on pointing me in the right 
>>direction is highly appreciated!
>>
>>    
>>
>
>Weird.  What's your GetObservation request URL?
>
>Also, you can test to see if this is even working via WMS or WFS as
>sanity check against the data connection, or even a mapserv CGI request.
>
>Let us know what your results are.
>
>..Tom
>  
>
Dear Tom,

thank you for your suggestions. I have moved my stuff from my local machine to our testserver so that you can have a look at everything. Please go to http://212.79.172.184/sos/

The other links I have provided below so that you can test WMS and WFS too.

WMS:
http://212.79.172.184/cgi-bin/mapserv?map=/var/www/demo.terrestris.de/html/sos/wms_demo.map&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=gauges&STYLES=,&SRS=EPSG:31467&BBOX=3001036,5248260,4193654,6100130&WIDTH=420&HEIGHT=300&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage

WFS:
http://212.79.172.184/cgi-bin/mapserv?map=/var/www/demo.terrestris.de/html/sos/wfs_demo.map&VERSION=1.0.0&REQUEST=GetFeature&SERVICE=WFS&TYPENAME=pegelpunkte

SOS:
Describe Sensor:
http://212.79.172.184/cgi-bin/mapserv410?map=/var/www/demo.terrestris.de/html/sos/sos_demo.map&Request=DescribeSensor&sensorID=NS01EE0014&service=SOS&version=0.0.31

Get Observation:
http://212.79.172.184/cgi-bin/mapserv410?map=/var/www/demo.terrestris.de/html/sos/sos_demo.map&REQUEST=GetObservation&SERVICE=SOS&offering=r_wert&observedproperty=r_wert&VERSION=0.0.31

Get Capabilities:
http://212.79.172.184/cgi-bin/mapserv410?map=/var/www/demo.terrestris.de/html/sos/sos_demo.map&REQUEST=GetCapabilities&SERVICE=SOS&VERSION=0.0.31

There was an error in my database connection which I found out trying the WFS but that did not have any effect on my GetObservation request. Thanks for your time.

Best regards,

Hinrich


**************************************************
*  Freie Software: AmeiN! ArcMap-Export-2-UMN    *
* Download http://sourceforge.net/projects/avein *
*			                         *
*        LiveLinux 'WebGIS auf CD'               *
*        http://www.terrestris.de                *
**************************************************

**************************************************

terrestris GbR
Dipl.-Geogr. Hinrich Paulsen
Siemensstr. 8
D-53121 Bonn

T: ++49 (0)228 - 962 899 51
F: ++49 (0)228 - 962 899 57

Internet: www.terrestris.de

**************************************************



More information about the mapserver-users mailing list