<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks Jackie,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
I pasted this comment into the ticket - perhaps comment in there to keep a public thread and for anyone searching in future:</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
OK, so though I was expecting something like the query below I hadn't realised in the WFS specification</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
>> 7.9.2.5.2 KVP encoding</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
>> For KVP-encoded requests the selection clause shall be encoded using</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
>> one of the keywords</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
>> FILTER, RESOURCEID or BBOX (see ISO 19143, Table 2).</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
So it is *NOT* possible to combine a BBOX with a FILTER</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
I guess my comment now is that this implementation of restrictToBBox (without an RFC) has effectively created a different FDO provider that had different capabilities.  The WFS provider publishes it's capabilities as ExpressionType_Basic with ConditionType_Comparison
 as well as ConditionType_Spatial.</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
However, when the restrictToBBox=True the ONLY ConditionType is Spatial.  The problem is that the capabilities are at the provider level and not at the connection string and so applications (like commercial AutoCAD Map) and others will present a WFS interface
 that allows property queries to be created but these will never be executed - resulting in a user experience of different resultsset than specified/expected.</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
{{{</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
http://ogc.bgs.ac.uk/digmap625k_gsml_insp_gs/wfs?version=2.0.0</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
&service=WFS</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
&REQUEST=GetFeature&service=WFS</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
&TYPENAMES=gsmlp:GBR_BGS_625k_BA_INSP&REQUEST=GetFeature</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
&BBOX=200000.0,600000.0,300000.0,700000.0,urn:ogc:def:crs:EPSG::27700&TYPENAMES=gsmlp:GBR_BGS_625k_BA_INSP</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
&SRSNAME=urn:ogc:def:crs:EPSG::27700</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
&Filter=<Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:gsmlp="http://xmlns.geosciml.org/geosciml-portrayal/4.0"><PropertyIsEqualTo><PropertyName>lithology</PropertyName><Literal>Basalt</Literal></PropertyIsEqualTo></Filter></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
}}}</div>
<div id="Signature">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
 Best regards,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
  Crispin</div>
</div>
<div id="appendonsend"></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<b>From:</b> mapguide-users <mapguide-users-bounces@lists.osgeo.org> on behalf of Jackie Ng via mapguide-users <mapguide-users@lists.osgeo.org><br>
<b>Sent:</b> Tuesday, July 15, 2025 11:21 AM<br>
<b>To:</b> MapGuide Users Mail List <mapguide-users@lists.osgeo.org><br>
<b>Subject:</b> Re: [mapguide-users] WFS FDO Ignores Filter When RestrictToBBox is True
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr;">I had some time to look at the issue in question and if we trace back to the original commit message in
<a data-auth="NotApplicable" class="OWAAutoLink" id="OWA1bbbddb1-d0dd-c83f-30cf-5ce5f94787a5" href="https://trac.osgeo.org/fdo/changeset/8194">
https://trac.osgeo.org/fdo/changeset/8194</a><br>
<br>
</div>
<div style="direction: ltr; margin: 0px 0px 0px 40px;">WFS Provider: Some WFS servers support BBOX filter only, but don't support normal filter. Some other servers support normal filter only, but don't support BBOX filter. In order to handle the 2 kinds of
 WFS servers, we add a new configuration item RestrictToBBox. If it is true, FDO WFS provider will generate BBOX filter for queries. Otherwise, it will generate normal filter as before</div>
<div style="direction: ltr;"><br>
Based on my interpretation of that commit message, I believe this would be intentional behavior. This setting seems to only be enabled to handle a specific kind of WFS server which if your example WFS server is producing the correct results when this setting
 is false then perhaps it's just a case of not turning on this setting?</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">- Jackie</div>
<div style="direction: ltr;"><br>
</div>
<div><br>
</div>
<div style="direction: ltr;" class="elementToProof">On Thu, 10 Jul 2025 at 21:14, Jackie Ng wrote:</div>
<blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left: 1px solid rgb(204, 204, 204);">
<div style="direction: ltr;">Hi Crispin,</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Thanks for the bug report.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">I'm somewhat busy this week, so I'll take a look at this early next week.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">- Jackie</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">You wrote:</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I documented this more at <a data-auth="NotApplicable" class="OWAAutoLink" id="OWA76b8bc6e-dfd6-d4b9-b118-3222398f9c55" href="https://trac.osgeo.org/fdo/ticket/1009">
https://trac.osgeo.org/fdo/ticket/1009</a> but think that is fairly unmonitored and as it obviously affects MGOS4 I hope it can get some attention as affecting MapGuide issue.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
As MGS is by it's nature as a web mapping viewer, it applies a BBox / Intersects query for every web map page request.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
The issue is that if the new format RestrictToBBox = True is applied to the WFS query connection parameters then all property/aspatial filters are stripped/ignored when sent to the WFS server; resulting in an unexpected return of ALL data within the map window.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
See sample MGP package attached, based on open British Geological Survey data. The attached screen grab shows the WebLayout preview highlighting in red Basalt lithography (use the WebLayout as it zooms/centres to a sensible scale and area).  The initial display
 used the connection format WITHOUT the BBox parameter.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
If the other Filtered themed layer is turned on, even though it has a filter for lithology='Basalt', all data is returned.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
It is the BBox parameter that results in unexpected results, even though filter and BBox are possible.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
See FDO ticket for details or use Fiddler etc and apply proxy parameters to the WFS connection to capture web traffc.</div>
<div id="x_m_-5571762519956893523m_-5762571546764814648Signature">
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt;">
 Best regards,</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt;">
  Crispin</div>
<div style="direction: ltr;"><br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>--</div>
<div style="direction: ltr;"><a data-auth="NotApplicable" class="OWAAutoLink" id="OWAa8ab7b0e-2f7e-d5d6-2255-de14d20166a9" href="http://themapguyde.blogspot.com">http://themapguyde.blogspot.com</a></div>
<p>Tel: <a href="tel:+441413742741">+44 141 374 2741</a> <br>
Web: <a href="https://trueviewvisuals.com/">TrueViewVisuals.com</a> and <a href="https://www.roadsonline.co.uk/">
RoadsOnline.co.uk</a></p>
<img src="https://trueviewvisuals.com/wp-content/uploads/2025/06/email_footer_both_logos_vsmall.jpg" alt="TVV and LCRIG - RoadsOnline">
<br>
<span style="font-size:8.0pt">This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by
 e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain
 viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.</span>
</body>
</html>