[mapserver-users] MapServer 7.0 WFS post request using ogc filter

Even Rouault even.rouault at spatialys.com
Wed Aug 17 08:37:26 PDT 2016


Le mercredi 17 août 2016 16:57:44, TMa Teng a écrit :
> Hi guys,
> 
> I am currently facing problems using WFS in MapServer 7.0. The WFS works in
> MapServer 6.0.4 before I upgrade MapServer 7.0 and Mapfile, database
> connection everything has not been changed. Is there any change to WFS
> call from MapServer version 6.0 to version 7.x? Please advise me if there
> is anything I am missing.

You didn't explain what didn't work exactly. Like do you get a response with 
zero features in it ?

This might be an issue with the coordinate order of  in lowerCorner and 
upperCorner query. I assume that the SRS of the layer is EPSG:4326 ? If so, 
you should likely put the values in latitude longitude order (they look like 
being longitude latitude in your below sample). And it would also be better to 
explictly specify the SRS by adding a srsName="urn:ogc:def:crs:EPSG::4326" 
attribute to the <gml:Envelope> element.

> 
> 
> My request body:
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
> version="1.1.0" maxFeatures="200"
> xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <wfs:Query
> typeName="parcelpoints"
> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> <ogc:Filter
> xmlns:ogc="http://www.opengis.net/ogc">
>       <ogc:BBOX>
>         <ogc:PropertyName>shape</ogc:PropertyName>
>         <gml:Envelope xmlns:gml="http://www.opengis.net/gml">
>           <gml:lowerCorner>-81 41</gml:lowerCorner>
>           <gml:upperCorner>-80.9 41.01</gml:upperCorner>
>         </gml:Envelope>
>       </ogc:BBOX>
>     </ogc:Filter>
>   </wfs:Query>
> </wfs:GetFeature>
> 
> Thanks in advance,
> 
> Martin

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com



More information about the MapServer-users mailing list