MapServer SOS(传感器观测服务)配置
Posted
技术标签:
【中文标题】MapServer SOS(传感器观测服务)配置【英文标题】:MapServer SOS (Sensor Observation Service) Configuration 【发布时间】:2012-02-07 09:31:20 【问题描述】:我尝试设置 MapServer SOS,但遇到了一个问题:SOS 没有返回任何内容。您可能会在下面看到我创建的地图文件:
MAP
NAME "SOS_DEMO"
STATUS ON
SIZE 400 300
EXTENT -180 -90 180 90
UNITS METERS
SHAPEPATH "C:\ms4w\apps\tutorial\data"
IMAGECOLOR 255 255 255
WEB
IMAGEPATH "C:\ms4w\apps\tutorial\templates"
IMAGEURL "C:\ms4w\apps\tutorial\images"
METADATA
"sos_onlineresource" "http://127.0.0.1:8282/cgi-bin/mapserv.exe?map=c:/ms4w/mysos.map?"
"sos_title" "My SOS Demo Server"
"sos_srs" "EPSG:4326"
"sos_enable_request" "*"
END
END
PROJECTION
"init=epsg:4326"
END
LAYER
NAME "sos_point"
METADATA
"sos_procedure" "ifgi-sensor-1"
"sos_offering_id" "WQ1289"
"sos_observedproperty_id" "Water Quality"
"sos_describesensor_url" "http://127.0.0.1:8181/DescribeSensor.xml"
END
TYPE POINT
STATUS ON
DATA 'sospoint'
PROJECTION
"init=epsg:4326"
END
CLASS
NAME 'sospoint'
STYLE
COLOR 255 128 128
END
END
END
END
如您所见,我尝试从 shapefile 检索传感器数据。 SOS返回的信息是:
<om:ObservationCollection xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows/1.1" 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" xmlns:sos="http://www.opengis.net/sos/1.0" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:om="http://www.opengis.net/om/1.0" gml:id="WQ1289" xsi:schemaLocation="http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/om.xsd http://mapserver.gis.umn.edu/mapserver http://127.0.0.1:8282/cgi-bin/mapserv.exe?map=c:/ms4w/mysos.map?service=WFS&version=1.1.0&request=DescribeFeatureType&typename=urban">
<om:member>
<om:Observation>
<om:procedure xlink:href="urn:ogc:def:procedure:ifgi-sensor-1"/>
<om:observedProperty>
<swe:CompositePhenomenon gml:id="Water Quality" dimension="3">
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:Id"/>
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:sensor_nam"/>
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:sensor_val"/>
</swe:CompositePhenomenon>
</om:observedProperty>
<om:resultDefinition>
<swe:DataBlockDefinition>
<swe:components>
<swe:DataRecord/>
</swe:components>
<swe:encoding>
<swe:TextBlock tokenSeparator="," blockSeparator=" " decimalSeparator="."/>
</swe:encoding>
</swe:DataBlockDefinition>
</om:resultDefinition>
<om:result></om:result>
</om:Observation>
</om:member>
</om:ObservationCollection>
虽然我在 shapefile 中放入了 6 个观察结果,但 SOS 没有返回任何结果。你能告诉我我应该怎么做才能解决这个问题吗?!
谢谢, 易卜拉欣
【问题讨论】:
你使用了什么请求? 【参考方案1】:也许最好在这里问? https://gis.stackexchange.com/
【讨论】:
以上是关于MapServer SOS(传感器观测服务)配置的主要内容,如果未能解决你的问题,请参考以下文章