[mapserver-users] map server WFS with GML input

Leigh Porter leigh at bowline.tech
Thu May 16 12:24:59 PDT 2019


Hey All!

I just joined the list. I have used mapserver for a while and just started with WFS.


I’m serving WFS requests from a GML input file. Input is like this:

<gml:featureMember>
    <ogr:2019_03_avon_and_somerset_street fid="2019_03_avon_and_somerset_street.0">
      <ogr:geometryProperty><gml:Point><gml:coordinates>-3.187863,54.948226</gml:coordinates></gml:Point></ogr:geometryProperty>
      <ogr:Crime_ID>f2964c095957f50f54b16d18c71be4a1f09f55e7f321edac3f38b469877e7fc5</ogr:Crime_ID>
      <ogr:Month>2019-03</ogr:Month>
      <ogr:Reported_by>Avon and Somerset Constabulary</ogr:Reported_by>
      <ogr:Falls_within>Avon and Somerset Constabulary</ogr:Falls_within>
      <ogr:Location>On or near Field View</ogr:Location>
      <ogr:LSOA_code>E01019107</ogr:LSOA_code>
      <ogr:LSOA_name>Allerdale 002B</ogr:LSOA_name>
      <ogr:Crime_type>Other theft</ogr:Crime_type>
      <ogr:Last_outcome_category>Under investigation</ogr:Last_outcome_category>
      <ogr:Context></ogr:Context>
    </ogr:2019_03_avon_and_somerset_street>
  </gml:featureMember>

But the output doesn’t include any of the other feature attributes (such as Crime_ID).

<wfs:member>
    <ms:sas-avon>
        <gml:boundedBy>
            <gml:Envelope
                srsName="urn:ogc:def:crs:EPSG::4326">
                <gml:lowerCorner>
                    50.948685 -2.807610
                    </gml:lowerCorner>
                <gml:upperCorner>
                    50.948685 -2.807610
                    </gml:upperCorner>
                </gml:Envelope>
            </gml:boundedBy>
        <ms:msGeometry>
            <gml:Point
                gml:id=".1"
                srsName="urn:ogc:def:crs:EPSG::4326">
                <gml:pos>
                    50.948685 -2.807610
                    </gml:pos>
                </gml:Point>
            </ms:msGeometry>
        </ms:sas-avon>
    </wfs:member>

The mapfile looks like this:

   LAYER
                NAME street-avon
                TYPE POINT
                STATUS DEFAULT
                CONNECTIONTYPE OGR
                CONNECTION "/vsicurl/http://127.0.0.1/2019-03-avon-and-somerset-street.csv.gml"
                CLASS
                        STYLE
                                COLOR 0 255 0
                                SYMBOL 'circle'
                                SIZE 6
                        END
                END
        END


I don’t think I need to add anything to the apple for the feature attributes to be included in the WFS output, or do I?


Thanks!
Leigh 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190516/cf9153f6/attachment.htm>


More information about the MapServer-users mailing list