Hello kind people of Geotools,

After upgrading to Geotools version 9.2 (from 2.7.5) we had a problem
with all our samples because of GEOT-4211 (CQL Filter fails when certain
values are passed).
I took a look at the grammar files and saw that the newly (since 8.x)
added relate filter functionality conflicts with the parsing of
integers.

TOKEN [IGNORE_CASE]:
{
    < #DIMENSION_SYMBOL: "*"| "T" | "F" | "0" | "1" | "2"> |
    < DE9IM_PATTERN:
<DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL>
 >
}

Which overlaps with 9 digit integers existing of only 0, 1 & 2.


If I add left and right square brackets everything works fine, this does
however change the syntax of the Relate function.

TOKEN [IGNORE_CASE]:
{
    < #DIMENSION_SYMBOL: "*"| "T" | "F" | "0" | "1" | "2"> |
    < DE9IM_PATTERN:
<LSP><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><DIMENSION_SYMBOL><RSP>
 >
}

Sample:
RELATE(the_geom, LINESTRING (-134.921387 58.687767, -135.303391
59.092838), T*****FF*)

becomes:
RELATE(the_geom, LINESTRING (-134.921387 58.687767, -135.303391
59.092838), [T*****FF*])


I took brackets because the pattern represents a matrix, but it could
also be something else (quotes for instance (making it a string)).


Thought / Remarks?

If you like I can make a patch, but changing syntax probably needs some
discussion / more formal way of handling, as it will break your code if
you use the relate filter.



Sincerely
Kristof Heirwegh


DFC Software Engineering 
Brugsesteenweg 587 
9030 Gent 
T: +32 (0)9 236 61 96 
F: +32 (0)9 236 54 12 
W: www.dfc.be 




------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to