[mapserver-users] QGIS / Mapserver WFS filter (bbox/envelope) interoperability issue

Andreas Neumann andreas at qgis.org
Fri Jun 5 03:12:02 PDT 2020


Hi,

My current employer runs QGIS on Windows and we would like to access a WFS
server provided by an UMN mapserver provided by another authority in
Switzerland (they run UMN Mapserver 7.0x for now). We'd like to use an
envelope or box to get filtered features from that WFS.

QGIS has a method called ST_MakeEnvelop() for creating a box geometry. When
the request is sent to the UMN mapserver, the filter result looks like this:

<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="
http://www.opengis.net/gml/3.2">
    <fes:And>
        <fes:PropertyIsEqualTo>
            <fes:ValueReference>kanton</fes:ValueReference>
            <fes:Literal>SO</fes:Literal>
        </fes:PropertyIsEqualTo>
        <fes:Intersects>
            <fes:ValueReference>wkb_geometry</fes:ValueReference>
            <gml:Envelope srsName="urn:ogc:def:crs:EPSG::2056">
                <gml:lowerCorner>2612000 1245500</gml:lowerCorner>
                <gml:upperCorner>2613500 1246500</gml:upperCorner>
            </gml:Envelope>
        </fes:Intersects>
    </fes:And>
</fes:Filter>

The reply from UMN 7.0.x is that this filter is unsupported. UMN would,
however, support something like:

<Filter>  <Intersects>    <PropertyName>msGeometry</PropertyName>
<Box srsName='EPSG:2056'>      <coordinates>2612000,1245500
2613500,1246500</coordinates>    </Box>  </Intersects></Filter>


So there seems to be an interoperability issue here between QGIS and UMN:
QGIS has no method to send the "Box" syntax that UMN would accept and UMN
doesn't seem to accept the "Envelope"-style syntax that QGIS would generate
when the user is using the ST_MakeEnvelope() function:

[image: image.png]

So my question: is a newer version of UMN (7.2, 7.4, 7.6) perhaps the
"Envelope" style syntax in the WFS filter that QGIS Desktop is sending or
should we better try to add a new "bbox" method to the WFS Client of QGIS
Desktop? I quickly browsed through the UMN Mapserver changelogs but didn't
see any obvious improvement around "Envelope" support in filters.

Thanks for your thoughts,
Andreas

--
Andreas Neumann
QGIS.ORG board member (treasurer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200605/699a8ec7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12307 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200605/699a8ec7/attachment-0001.png>


More information about the mapserver-users mailing list