[mapserver-users] Question about config Mapserver to provide SOS service from postgis table/view
Miguel-Angel Manso-Callejo (UPM)
m.manso at upm.es
Sun Jun 15 23:58:19 PDT 2014
Thank you Stephen
At this moment i can send a GetObservation Request and get response in
O&M format but i can't understand why sos mapserv don't recognize any
procedure name or eventTime format.
First: In order to do it i must change DATA sql to:
DATA "pos from (select pos,fecha,vap from vaporcolumna where
id='MADR13407S012') as subquery using unique fecha using srid=4326"
Then, when i request data GetObservation the answer is like:
<om:member>
<om:Observation>
<om:samplingTime>
<gml:TimeInstant>
<gml:timePosition>2014-01-29 04:00:00</gml:timePosition>
</gml:TimeInstant>
</om:samplingTime>
<om:procedurexlink:href="*urn:ogc:def:procedure*:2197.7"/>
<om:observedProperty>
<swe:CompositePhenomenongml:id="vap"dimension="2">
<gml:name>Vapor agua columna</gml:name>
<swe:componentxlink:href="urn:ogc:def:property:OGC-SWE:1:fecha"/>
<swe:componentxlink:href="urn:ogc:def:property:OGC-SWE:1:vap"/>
</swe:CompositePhenomenon>
</om:observedProperty>
<om:featureOfInterestxlink:href="http://138.100.61.23:90/cgi-bin/sos-mapserv?service=WFS&version=1.1.0&request=DescribeFeatureType&typename=test_sos_layer"/>
<om:result>
<gml:featureMember>
<ms:test_sos_layer>
<gml:boundedBy>
<gml:EnvelopesrsName="urn:ogc:crs:epsg:4326"srsDimension="2">
<gml:lowerCorner>-4.249658 40.429163</gml:lowerCorner>
<gml:upperCorner>-4.249658 40.429163</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<ms:msGeometry>
<gml:PointsrsName="urn:ogc:crs:epsg:4326"srsDimension="2">
<gml:pos>-4.249658 40.429163</gml:pos>
</gml:Point>
</ms:msGeometry>
</ms:test_sos_layer>
</gml:featureMember>
</om:result>
</om:Observation>
</om:member>
<om:member>
However procedure name don't appear in xml
<om:procedurexlink:href="urn:ogc:def:procedure:2197.7"/>
Then when i tryed to getObservation using parameter
/&procedure=urn:ogc:def:procedure:/ mapserver SOS don't recognize any
Second question are related to eventTime request parameter.
I'm trying to use
&eventtime=2014-01-01T00:00:00+01/2014-01-31T00:00:00+01 and an
exception apear msSOSGetObservation(): SOS server error. Invalid time
value given for the eventTime parameter
I must do request with XML FE format
&eventtime=%3Cogc:TM_Equals%3E%3Cgml:TimePeriod%3E%3Cgml:beginPosition%3E2014-01-01%3C/gml:beginPosition%3E%3Cgml:endPosition%3E2014-01-31%3C/gml:endPosition%3E%3C/gml:TimePeriod%3E%3C/ogc:TM_Equals%3E
What are the correct ISO time format to operate without XML?
Regards,
Miguel A.
>/ Dear all,
/>/
/>/ I'm trying to config mapserver to offer through SOS data stored in two
/>/ tables joined by a view.
/>/
/>/ I'm trying to offer in the first step only one time serial data and i'm
/>/ using this configuration:
/>/
/>/ LAYER
/>/ NAME "test_sos_layer"
/>/ METADATA
/>/ "sos_procedure" "vaporcolumna" ## REQUIRED
/>/ "sos_procedure_item" "vap"
/>/ "sos_offering_id" "MADR13407S012" ## REQUIRED
/>/ "sos_timeitem" "fecha"
/>/ "sos_observedproperty_id" "vap"
/>/ "sos_observedproperty_name" "Vapor_agua_columna"
/>/ "sos_offering_timeextent" "2010/2014"
/>/ "sos_describesensor_url"
/>/ "http://138.100.61.23:90/sensorml/MADR13407S012.xml" ## REQUIRED
/>/ "sos_offering_name" "GPS Station in Madrid 13407S012"
/>/ END
/>/ TYPE POINT
/>/ STATUS ON
/>/ CONNECTIONTYPE POSTGIS
/>/ CONNECTION "host=127.0.0.1 port=5432 dbname=example_postgis21
/>/ user=postgres password=postgres"
/>/ DATA "pos, vap from vaporcolumna where id='MADR13407S012' "
/>/
/>/ PROJECTION
/>/ "init=epsg:4326"
/>/ END
/>/
/>/ CLASS
/>/ NAME "vap"
/>/ STYLE
/>/ COLOR 255 0 0
/>/ SYMBOL "circle"
/>/ SIZE 8
/>/ END
/>/ END
/>/ END
/>/
/>/
/>/ View have this fields:
/>/ Id (pk), pos (geometry), vap (double), fecha (date)
/>/
/>/ Can any one help me informing what i'm doing bad or how must i config in
/>/ order to do it?
/
You probably need to make sure pos is listed in the geometry_columns
table and associated with your view.
Turn on layer debugging and set DEBUG 5
try to use shp2img so see the log messages and any error messages.
-Steve W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140616/dd2adba7/attachment.htm>
More information about the MapServer-users
mailing list