<div dir="ltr"><div>Hi,</div><div><br></div><div>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.</div><div><br></div><div>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:</div><div><br></div><div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace"><fes:Filter xmlns:fes="<a href="http://www.opengis.net/fes/2.0">http://www.opengis.net/fes/2.0</a>" xmlns:gml="<a href="http://www.opengis.net/gml/3.2">http://www.opengis.net/gml/3.2</a>"></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">    <fes:And></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">        <fes:PropertyIsEqualTo></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">            <fes:ValueReference>kanton</fes:ValueReference></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">            <fes:Literal>SO</fes:Literal></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">        </fes:PropertyIsEqualTo></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">        <fes:Intersects></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">            <fes:ValueReference>wkb_geometry</fes:ValueReference></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">            <gml:Envelope srsName="urn:ogc:def:crs:EPSG::2056"></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">                <gml:lowerCorner>2612000 1245500</gml:lowerCorner></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">                <gml:upperCorner>2613500 1246500</gml:upperCorner></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">            </gml:Envelope></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">        </fes:Intersects></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace">    </fes:And></span></div><div style="margin:0px;padding:0px;border:0px none;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace"></fes:Filter></span></div></div><div><br></div><div>The reply from UMN 7.0.x is that this filter is unsupported. UMN would, however, support something like:</div><div><br></div><div><pre style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline;font-family:monospace;color:rgb(0,0,0);overflow-x:auto;white-space:pre;display:block;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><code style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline;font-family:monospace;overflow-x:auto;display:inline"><code style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline;font-family:monospace;overflow-x:auto;display:inline"><span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><Filter></span></span>
<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">  <span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><Intersects></span></span>
<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">    <span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><PropertyName></span>msGeometry<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"></PropertyName></span></span>
<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">    <span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><Box</span> <span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">srsName=</span><span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">'EPSG:2056'</span><span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">></span></span>
<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">      <span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><coordinates></span>2612000,1245500 2613500,1246500<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"></coordinates></span></span>
<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">    <span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"></Box></span></span>
<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline">  <span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"></Intersects></span></span>
<span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"></Filter><br><br></span></span></code></code></pre><pre style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline;font-family:monospace;color:rgb(0,0,0);overflow-x:auto;white-space:pre;display:block;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial"><code style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline;font-family:monospace;overflow-x:auto;display:inline"><code style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline;font-family:monospace;overflow-x:auto;display:inline"><span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px none;font-size:13px;vertical-align:baseline"><br></span></span></code></code></pre></div><div><span style="font-family:arial,sans-serif">So there seems to be an interoperability issue here between QGIS and UMN: QGIS has no method </span>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:</div><div><br></div><div><div><img src="cid:ii_kb21rlse0" alt="image.png" width="489" height="237"><br><br></div></div><div>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.<br></div><div><br></div><div>Thanks for your thoughts,</div><div>Andreas<br></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>--<br>Andreas Neumann<br></div><a href="http://QGIS.ORG" target="_blank">QGIS.ORG</a> board member (treasurer)<br></div></div></div></div>