Package org.geotools.feature.visitor

Examples of org.geotools.feature.visitor.QuantileListVisitor


        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];
View Full Code Here

TOP

Related Classes of org.geotools.feature.visitor.QuantileListVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.