<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>Steve,</div>
<div><br>
</div>
<div>I tested this out with 7.1 with numeric type fields and it works for me as long as I don't use matchCase="false". That seems to kick it in to a string comparison. matchCase="true" and just PropertyIsEqualTo work fine.</div>
<div><br>
</div>
<div>In our metadata we use "gml_types" "auto" when the database knows the types and explicit declarations (eg "gml_attributename_type" "integer") when it doesn't work.</div>
<div><br>
</div>
<div>The key is that the field type has to report as a numeric type or the backend treats it as a string comparison.</div>
<div><br>
</div>
<div>Mike</div>
<div>
<div>
<div>----</div>
<div>Michael Smith</div>
</div>
<div>US Army Corps</div>
<div>Remote Sensing GIS/Center</div>
<div>michael.smith@usace.army.mil</div>
<div><br>
</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>"<a href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a>" <<a href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, May 13, 2015 at 10:35 AM<br>
<span style="font-weight:bold">To: </span>thomas bonfort <<a href="mailto:thomas.bonfort@gmail.com">thomas.bonfort@gmail.com</a>><br>
<span style="font-weight:bold">Cc: </span>MapserverList OSGEO <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature with filter on numeric field<br>
<span style="font-weight:bold">Resent-From: </span>Michael Smith <<a href="mailto:michael.smith@usace.army.mil">michael.smith@usace.army.mil</a>><br>
</div>
<div><br>
</div>
<div>
<div><font size="2" face="sans-serif">Precision: we are using MS7.1</font> <br>
<font size="2" face="sans-serif">Removing matchcase part makes oracle, and postgis, crash.</font><br>
<font size="2" face="sans-serif">I have this error:</font> <br>
<font size="2" color="#2f2f2f" face="Arial"><br>
<ows:ExceptionReport xmlns:xsi="</font><a href="http://www.google.com/url?q=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&sa=D&sntz=1&usg=AFQjCNFERp6A_kcvqihMCKJ7EHX8O14vIA" target="_blank"><font size="2" color="blue" face="Arial"><u>http://www.w3.org/2001/XMLSchema-instance</u></font></a><font size="2" color="#2f2f2f" face="Arial">" xmlns:ows="</font><a href="http://www.google.com/url?q=http%3A%2F%2Fwww.opengis.net%2Fows&sa=D&sntz=1&usg=AFQjCNE9_q7eSkcBl4XJimXTw1Zx0EiDow" target="_blank"><font size="2" color="blue" face="Arial"><u>http://www.opengis.net/ows</u></font></a><font size="2" color="#2f2f2f" face="Arial">" version="1.1.0" language="en-US"xsi:schemaLocation="</font><a href="http://www.google.com/url?q=http%3A%2F%2Fwww.opengis.net%2Fows&sa=D&sntz=1&usg=AFQjCNE9_q7eSkcBl4XJimXTw1Zx0EiDow" target="_blank"><font size="2" color="blue" face="Arial"><u>http://www.opengis.net/ows</u></font><
/a></a><a href="http://www.google.com/url?q=http%3A%2F%2Fschemas.opengis.net%2Fows%2F1.0.0%2FowsExceptionReport.xsd&sa=D&sntz=1&usg=AFQjCNGmnK6iSrh-cSWEtM2VV17uuSbVNA" target="_blank"><font size="2" color="blue" face="Arial"><u>http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd</u></font></a><font size="2" color="#2f2f2f" face="Arial">"><br>
<ows:Exception exceptionCode="NoApplicableCode" locator="mapserv"><br>
<ows:ExceptionText><br>
msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data statement and server logs<br>
</ows:ExceptionText></font><font size="3"> </font><br>
<br>
<br>
<font size="2" face="sans-serif">The problem might be the decimals?</font> <br>
<font size="2" face="sans-serif">Here is the request</font> <br>
<tt><font size="2"><wfs:Query typeName="feature:SMDVDP_STAT_METE" srsName="EPSG:32198"></font></tt><br>
<tt><font size="2"><ogc:Filter xmlns:ogc="</font></tt><a href="http://www.opengis.net/ogc"><tt><font size="2" color="blue">http://www.opengis.net/ogc</font></tt></a><tt><font size="2">"></font></tt><br>
<tt><font size="2"><ogc:PropertyIsEqualTo></font></tt> <br>
<tt><font size="2"><ogc:PropertyName>LONG_STAT</ogc:PropertyName></font></tt> <br>
<tt><font size="2"><ogc:Literal><b>-61,8031</b></ogc:Literal></font></tt> <br>
<tt><font size="2"></ogc:PropertyIsEqualTo></font></tt> <br>
<tt><font size="2"></ogc:Filter></font></tt> <br>
<tt><font size="2"></wfs:Query></font></tt> <br>
<tt><font size="2"></wfs:GetFeature></font></tt> <br>
<br>
<p><br>
<br>
<br>
<table width="100%" style="border-collapse:collapse;">
<tbody>
<tr valign="top" height="8">
<td width="40%" style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<font size="1" face="sans-serif"><b>thomas bonfort <<a href="mailto:thomas.bonfort@gmail.com">thomas.bonfort@gmail.com</a>></b></font>
<p><font size="1" face="sans-serif">2015-05-13 05:40</font> </p>
</td>
<td width="59%" style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<table width="100%" style="border-collapse:collapse;">
<tbody>
<tr valign="top" height="21">
<td width="57" style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align="right"><font size="1" face="sans-serif">A</font></div>
</td>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<font size="1" face="sans-serif"><a href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a></font>
</td>
</tr>
<tr valign="top" height="21">
<td width="57" style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align="right"><font size="1" face="sans-serif">cc</font></div>
</td>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<font size="1" face="sans-serif">MapserverList OSGEO <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>></font></td>
</tr>
<tr valign="top" height="21">
<td width="57" style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align="right"><font size="1" face="sans-serif">Objet</font></div>
</td>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<font size="1" face="sans-serif">Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature with filter on numeric field</font></td>
</tr>
</tbody>
</table>
<br>
<table width="393" style="border-collapse:collapse;">
<tbody>
<tr valign="top" height="8">
<td width="57" style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
</td>
<td width="336" style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
</td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<br>
<br>
<tt><font size="2">can you try the same request without the "matchCase" part and report<br>
back please?<br>
<br>
On 12 May 2015 at 18:11, <<a href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a>> wrote:<br>
> I have a problem using a FILTER in a wfs getFeature request on an oracle DB<br>
> with MS7<br>
> When I launch a getFeature request with a Filter on a numeric field it<br>
> doesn't work,<br>
> <ogc:Filter xmlns:ogc="</font></tt><a href="http://www.opengis.net/ogc"><tt><font size="2">http://www.opengis.net/ogc</font></tt></a><tt><font size="2">"><ogc:PropertyIsEqualTo<br>
> matchCase="false"><ogc:PropertyName>LONG_STAT</ogc:PropertyName><ogc:Literal>-61</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter><br>
> here is the error we get in the browser<br>
> <ows:Exception exceptionCode="NoApplicableCode" locator="mapserv"><br>
> <ows:ExceptionText>msWFSGetFeature(): WFS server error.<br>
> FLTApplyFilterToLayer() failed<br>
> msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data<br>
> statement and server logs</ows:ExceptionText><br>
><br>
> from mapserver logs<br>
> [Tue May 12 11:59:10 2015].177992 msOracleSpatialLayerTranslateFilter.<br>
> String: ([LONG_STAT] =*-61)<br>
><br>
> LONG_STAT is a NUMBER in the DB<br>
> DescribefeatureType returns<br>
> <element name="NO_STAT_CLIM" minOccurs="0" type="string"/><br>
> <element name="NO_STAT_FADQ" minOccurs="0" type="string"/><br>
> <element name="NOM_STAT" minOccurs="0" type="string"/><br>
> <element name="LATI_STAT" minOccurs="0" type="string"/><br>
> <element name="LONG_STAT" minOccurs="0" type="string"/><br>
> <element name="ALTI_STAT" minOccurs="0" type="string"/><br>
><br>
> I tried to add "gml_types" "auto" in the mapfile, but it still returns<br>
> string as data type<br>
> I tried "gml_LONG_STAT_type" = "Integer" in the mapfile, describeFeatureType<br>
> returns "<element name="LONG_STAT" minOccurs="0" type="double"/> " but I<br>
> still get an error in getFeature<br>
><br>
> I'm using CONNECTIONTYPE oraclespatial in the mapfile<br>
><br>
> I can provide more information....<br>
><br>
> Is it a known issue or can I do something about that?<br>
><br>
> Thank you!<br>
> _______________________________________________<br>
> mapserver-users mailing list<br>
> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> </font></tt><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"><tt><font size="2">http://lists.osgeo.org/mailman/listinfo/mapserver-users</font></tt></a><tt><font size="2"><br>
</font></tt><br>
<br>
<br>
</p>
</div>
</div>
</span>
</body>
</html>