Jody Garnett wrote:
> That is not cool;
> 
> The method you found, ff.and( filter, filter ) is from the GeoAPI
> interface FilterFactory and should not be deprecated. If you are using
> the deprecated methods I would be more comfortable if you are consistent
> - ie use createLogicalFilter rather than mix and match. The 2.3 branch
> has had a lot of trouble with filters, 2.4 will be much better when
> justin manages to release it.
Yes you're right, I just tried the GeoAPI version because it was
suggested in the deprecation comments....
I have tried to upgrade to 2.4_M4 but I've run into so many
imcompatibility problems with my code that I decided to put it off for
now until the stable release comes out :-)

> 
> Only other thing would be confusion about AND vs OR:
> AND - will return less features, only the features that meet both cf and
> cf1 (although they look the same to me?).
> OR - will return more features, the features that meet either cf1 or cf2
That's the problem! I've should have used OR. Now it works. The AND and
OR gets me all the time, darn..

> 
> Can you confirm that you intended cf1 and cf2 to be the same?
No, they are not the same, I should have written
>>
>> CompareFilter cf = ff.createCompareFilter(Filter.COMPARE_EQUALS);            
>>   
>> cf.addLeftValue(ff.createAttributeExpression(at.getName()));
>> cf.addRightValue(ff.createLiteralExpression(name));
>>
>> CompareFilter cf1 = ff.createCompareFilter(Filter.COMPARE_EQUALS);
>> cf1.addLeftValue(ff.createAttributeExpression(at.getName()));
>> cf1.addRightValue(ff.createLiteralExpression(name1));

Mucho thanx
gaby
-- 
***************************************************************
**     Gabriella Turek               [EMAIL PROTECTED]      **
** National Institute of Water & Atmospheric Research (NIWA) **
** PO Box 8602 Christchurch New Zealand    +64-3-343-8067    **
***************************************************************

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to