Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I tried to set up MapServer SOS but I faced a problem: the SOS doesn't return anything. You may see the map file I have created below:

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   

As you see, I tried to retrieve sensor data from a shapefile. The message returned by the SOS is:

<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>

Although I put 6 observations into the shapefile but the SOS doesn't return any. Would you please let me know what I should do to resolve the problem?!

Thanks, Ebrahim

share|improve this question
add comment

1 Answer 1

How are you trying to retrieve the data? I get a similar result when I set the resultModel as "om:Observation" but get results when I set it to "om:Measurement"

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.