<!DOCTYPE html><html><head><title></title><style type="text/css">#qt P{margin-top:0px;margin-bottom:0px;}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Carlos,<br></div><div><br></div><div>If you add DEBUG 5 to the LAYER, and set the CONFIG MS_ERRORFILE do you get more details in the logs for why the filter is failing?<br></div><div>The error indicates MapServer cannot parse the filter. The unencoded filter is shown below. <br></div><div><br></div><div><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>"><br></div><div><fes:And><br></div><div> <fes:BBOX><br></div><div> <fes:ValueReference>wkb_geometry</fes:ValueReference><br></div><div> <gml:Envelope srsName="urn:ogc:def:crs:EPSG::27700"><br></div><div> <gml:lowerCorner>448535 197714</gml:lowerCorner><br></div><div> <gml:upperCorner>448849 197791</gml:upperCorner><br></div><div> </gml:Envelope><br></div><div> </fes:BBOX><br></div><div> <fes:Intersects xmlns:fes="<a href="http://www.opengis.net/fes/2.0">http://www.opengis.net/fes/2.0</a>"><br></div><div> <fes:ValueReference>wkb_geometry</fes:ValueReference><br></div><div> <fes:Function xmlns:fes="<a href="http://www.opengis.net/fes/2.0">http://www.opengis.net/fes/2.0</a>" name="geomFromWKT"><br></div><div> <fes:Literal xmlns:fes="<a href="http://www.opengis.net/fes/2.0">http://www.opengis.net/fes/2.0</a>">POLYGON((447915.65299999999115244 195673.18600000001606531, 449272.48200000001816079 195673.18600000001606531, 449272.48200000001816079 200345.65200000000186265, 447915.65299999999115244 200345.65200000000186265, 447915.65299999999115244 195673.18600000001606531))</fes:Literal><br></div><div> </fes:Function><br></div><div> </fes:Intersects><br></div><div></fes:And><br></div><div></fes:Filter><br></div><div><br></div><div>I'm guessing the geomFromWKT is not supported, so the filter should pass a GML Polygon object to filter by using an intersecting geometry. See <a href="https://mapserver.org/ogc/filter_encoding.html#tests">https://mapserver.org/ogc/filter_encoding.html#tests</a> for an example<br></div><div><br></div><div><Filter><br></div><div><Intersects><br></div><div><PropertyName>Geometry</PropertyName><br></div><div><gml:Polygon><br></div><div><gml:outerBoundaryIs><br></div><div><gml:LinearRing><br></div><div><gml:coordinates>135.5329,34.6624 135.4921,34.8153 135.3673,34.7815<br></div><div> 135.3800,34.6216 135.5361,34.6210 135.5329,34.6624</gml:coordinates><br></div><div></gml:LinearRing><br></div><div></gml:outerBoundaryIs><br></div><div></gml:Polygon><br></div><div></Intersects><br></div><div></Filter><br></div><div><br></div><div>Seth<br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div>On Mon, Feb 12, 2024, at 1:33 PM, Carlos Padron Florez via MapServer-users wrote:<br></div><blockquote type="cite" id="qt" style=""><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:11pt;color:rgb(0, 0, 0);">Hi,<br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:11pt;color:rgb(0, 0, 0);"><br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:11pt;color:rgb(0, 0, 0);">I have a WFS version 2.0.0 and I want to request from it features using a filter but I get this error:<br></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:monospace;"><span class="size" style="font-size:13px;">msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : <fes:Filter</span></span></span><br></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:monospace;"><span class="size" style="font-size:13px;"></span></span></span><br></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;">The request is the following:</span></span></span><br></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;"><br>https://SERVER/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=ms:layername&STARTINDEX=0&COUNT=1000000&SRSNAME=urn:ogc:def:crs:EPSG::27700&FILTER=%3Cfes:Filter xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22 xmlns:gml%3D%22http://www.opengis.net/gml/3.2%22%3E%0A
%3Cfes:And%3E%0A %3Cfes:BBOX%3E%0A %3Cfes:ValueReference%3Ewkb_geometry%3C/fes:ValueReference%3E%0A %3Cgml:Envelope srsName%3D%22urn:ogc:def:crs:EPSG::27700%22%3E%0A %3Cgml:lowerCorner%3E448535 197714%3C/gml:lowerCorner%3E%0A %3Cgml:upperCorner%3E448849
197791%3C/gml:upperCorner%3E%0A %3C/gml:Envelope%3E%0A %3C/fes:BBOX%3E%0A %3Cfes:Intersects xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3E%0A %3Cfes:ValueReference%3Ewkb_geometry%3C/fes:ValueReference%3E%0A %3Cfes:Function xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22
name%3D%22geomFromWKT%22%3E%0A %3Cfes:Literal xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3EPOLYGON((447915.65299999999115244 195673.18600000001606531, 449272.48200000001816079 195673.18600000001606531, 449272.48200000001816079 200345.65200000000186265,
447915.65299999999115244 200345.65200000000186265, 447915.65299999999115244 195673.18600000001606531))%3C/fes:Literal%3E%0A %3C/fes:Function%3E%0A %3C/fes:Intersects%3E%0A %3C/fes:And%3E%0A%3C/fes:Filter%3E%0A</span></span></span></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;"></span></span></span><br></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;">The same request, with obvious changes of server name, works on Geoserver. This request
is generated by Qgis so I don't if I can fix it via Mapserver or via QGIS.</span></span></span><br></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;">Any ideas?</span></span></span><br></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;"></span></span></span><br></div><div class="qt-elementToProof"><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;">Kind regards</span></span></span><br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:11pt;color:rgb(0, 0, 0);"><br></div><div id="qt-Signature"><p><span style="color:black;"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;"><b>Carlos PadrĂ³n, MRes </b>| </span></span></span><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;">Geomatics Team Lead</span></span></span><br></p><p><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:9pt;">D: 01865 664120 W: </span></span></span><span style="color:blue;"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:9pt;"><a href="http://www.gigaclear.com/" style="color:blue;margin-top:0px;margin-bottom:0px;">www.gigaclear.com</a></span></span></span><br></p><p><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:7pt;"> </span></span></span><br></p><p><span style="color:black;"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:12pt;"><img alt="signature_261337870" style="width:2.166in;height:0.444in;margin-top:0px;margin-bottom:0px;" src="cid:fb66f198-5066-45ad-980c-5810f8a34eb7"></span></span></span><br></p><p><span style="color:black;"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;">Gigaclear ltd, Building 1, Wyndyke Furlong, Abingdon, Oxfordshire, OX14 1UQ</span></span></span><br></p><p><span style="color:black;"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:7.5pt;">Gigaclear plc is registered in England and Wales with company number 07476617</span></span></span><br></p><p><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p></div><div>_______________________________________________<br></div><div>MapServer-users mailing list<br></div><div><a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div><br></div></blockquote><div><br></div></body></html>