I would recommend reading the test cases for working examples - from
StandardDeviationFunctionTest:
public void testSetNumberOfClasses() throws Exception{
LOGGER.finer("testSetNumberOfClasses");
Literal classes = ff.literal(3);
PropertyName exp = ff.property("foo");
StandardDeviationFunction func = (StandardDeviationFunction)
ff.function("StandardDeviation", exp, classes);
assertEquals(3, func.getClasses());
classes = ff.literal(12);
func = (StandardDeviationFunction) ff.function("StandardDeviation",
exp, classes);
assertEquals(12, func.getClasses());
}
I also note that some test cases are commented out indicating that they don't
work (perhaps you can provide a code review and patch).
Let me quickly check the docs…
http://docs.geotools.org/latest/userguide/library/main/collection.html#classifier-functions
http://docs.geotools.org/latest/userguide/extension/brewer/classifier.html
That page has examples showing how to both make a Classifier by hand or using
one of the functions, but yeah no example of standard deviation.
--
Jody Garnett
On Friday, 4 May 2012 at 1:54 AM, Y_Wang wrote:
> Dear All,
>
> I had trouble to find out what exactly arguments used for standard deviation
> classification function. Tested it endlessly without luck.
>
> There should be two arguments. Like quantile and others, is it right to pass
> attribute name such as 'population' or 'headcount' for average and how about
> the other? Tested with classification numbers such as 1, 2, 6...no good, the
> function returns error with no content to trace. Strangely, if tested using
> any number less than 1, such as 0.5, 0.25, the function runs with no error
> but the map not shown.
>
> Any help???
>
> Thanks a lot!
>
> Yang
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/StandardDeviation-Classification-Arguments-tp4949728.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com
> (http://Nabble.com).
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users