Aggregate Functions cannot be used with Expression
--------------------------------------------------

                 Key: GEOT-1626
                 URL: http://jira.codehaus.org/browse/GEOT-1626
             Project: GeoTools
          Issue Type: Bug
          Components: core filter
    Affects Versions: 2.5-M0, 2.4-RC0
            Reporter: Jody Garnett


Thanks to Gabrella for catching this (when updating to 2.4.M0); I have 
confirmed the problem exists on 2.5.x as well.

A few aggregate functions such as Collection_MaxFunction; have reduced their 
functionality down to a utility method:
{code}
calculateMax(FeatureCollection collection, Expression expression)
{code}

These methods have not been updated to use opengis Filter and require a cast to 
be successful.

As a workaround users can use the function as part of a normal function 
expression, rather than making use of these out of date methods:
{code}
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
Function sum = ff.function("Collection_Sum", ff.property("age"));
        
Object value = sum.evaluate( featureCollection );
{code}

I don't think anyone is interested in maintaining a public API at this level; 
chances are those methods
were just hanging out for test cases to call; will try and change them to 
package visibility.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to