[mapserver-users] PropertyIsLIke WFS filter with SQL Server

Steve Wagstaff steve.wagstaff at lineone.net
Tue May 2 05:17:18 PDT 2017


Hi

 

We have just upgraded to MS 7.04 from 6.4 (64bit on Win 2012/IIS8) and are
having an issue with the PropertyIsLike WFS filter - but only when we use it
against SQL Server data.

 

If we issue a filter as so:

 

&filter=<ogc:Filter><ogc:PropertyIsLike matchCase="false" wildCard="*"
singleChar=""
escapeChar="!"><ogc:PropertyName>ADDRESS</ogc:PropertyName><ogc:Literal>*57
high *</ogc:Literal></ogc:PropertyIsLike></ogc:Filter>

 

 

..I get a very long running query which eventually returns some records (but
not the correct ones) - it appears to be doing a select all with no where
clause.

 

I get this in the MapServer log files - which looks like MapServer cannot
from a query for SQL server with Like.

 

[Tue May 02 10:52:27 2017].755000 msWFSParseRequest(): WFS post request:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd
<http://www.opengis.net/wfs%20http:/schemas.opengis.net/wfs/1.1.0/wfs.xsd>
"><wfs:Query typeName="feature:LLPG_Property_Point_vw"
srsName="EPSG:27700"><ogc:Filter
xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsLike matchCase="false"
wildCard="*" singleChar="."
escapeChar="!"><ogc:PropertyName>ADDRESS</ogc:PropertyName><ogc:Literal>*57
high*</ogc:Literal></ogc:PropertyIsLike></ogc:Filter></wfs:Query></wfs:GetFe
ature>

[Tue May 02 10:52:27 2017].755000 FLTLayerApplyPlainFilterToLayer():
("[ADDRESS]" ~* ".*57 high.*"),
rect=510500.000000104,165499.999998641,539172.000000336,194171.999999644

[Tue May 02 10:52:27 2017].755000 Filter could not be translated to OGR
filter

[Tue May 02 10:52:53 2017].380000 mapserv request processing time (msLoadMap
not incl.): 25.625s

 

If I use a PropertyIsEqualTo filter I have no problem.

 

If I use the PropertyIsLike against the same data exported to a shape file
again it works fine.

 

The exact same filters work fine 6.4.

 

Any help/pointers much appreciated!

 

GDAL  with the 7.04 is 2.1.03 (all from gis internals)

 

 

Steve W

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170502/fc0354cd/attachment.html>


More information about the mapserver-users mailing list