super(NAME);
}
private Object calculate(SimpleFeatureCollection featureCollection) {
// use a visitor to find the values in each bin
QuantileListVisitor quantileVisit = new QuantileListVisitor(getParameters().get(0), getClasses());
if (progress == null) progress = new NullProgressListener();
try {
featureCollection.accepts(quantileVisit, progress);
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "QuantileFunction calculate(SimpleFeatureCollection) failed" , e);
return null;
}
if (progress.isCanceled()) return null;
CalcResult calcResult = quantileVisit.getResult();
if (calcResult == null) return null;
List[] bin = (List[]) calcResult.getValue();
//generate the min and max values, and round off if applicable/necessary
Comparable globalMin = (Comparable) bin[0].toArray()[0];