Hello list, we are near to finish our TXT proposal called "Extension of CQL to 
match abilities of Filter" 

http://docs.codehaus.org/display/GEOTOOLS/Extention+of+CQL+to+match+abilities+of+Filter

In the inception phase we picked up the suggestions of a lot of people. Then 
we were working to provide the better solution for the  great majority. In the 
next list I try to explain some decisions.  

1- IN Predicate and Id filter
We arrived to a sentence like this

 ID IN states1,states.2,states.3 

I found a problem to write the grammar for the id values, because its pattern 
is equal to "identifier" (property or attributes) token. Then the lexical 
analysis is not possible. Well,  I solved this issue using the string pattern 
then the id values must be between quotes ('states1','states.2','states.3' ).

Finally, some user suggested to add something like the IN sentence (from SQL) 
to avoid query like x=1 or x=2 or x=3 .... . Well thinking in the 
compatibility with this sentence I thought Id Predicate should be consistent 
with this. Then I added the parenthesis "(" ")", the final result was

id predicate
        ID IN ( 'states1', 'states.2' , 'states.3' )

in predicate 
        length IN (4100001,4100002, 4100003 )

2- BBOX extension 
CQL allows to write BBOX(the_geom, 10.0, 20.0, 30.0, 40.0)

The idea was extend it to allow to write a sentence like 

BBOX( buffer( the_geom , 10) ,  10.0, 20.0, 30.0, 40.0)
To implement this was needed to change the actual implementation of 

org.geotools.filter.FilterFactoryImpl Class

public BBOX bbox(
        Expression e, double minx, double miny, 
        double maxx, double maxy, String srs)

that limit the first parameter "e" to instance of "PropertyNames". (Jody 
suggested me to make a proposal, I will do it)

- Reference
Interested people can find the source code in 

http://svn.geotools.org/trunk/modules/library/cql

There is a "light" test that could be a good overview in

org.geotools.filter.text.txt.TXTTest

The package org.geotools.filter.text.txt contains many test cases if you are 
interested in more details.  

Finally, I would like the next step in the process. Maybe, is it time to start 
the voting?. 
Could I begin to organize the user documentation  
in http://docs.codehaus.org/display/GEOTDOC/14+CQL ? 


-- 
Mauricio Pazos
www.axios.es


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to