/** * Version 1.0 is to handle single variable 2DSquareCelled raster data. * Copyright (C) 2005 Andy Turner, CCG, University of Leeds, UK. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ package uk.ac.leeds.ccg.andyt.grids.core; import java.math.BigInteger; import java.math.BigDecimal; /** * An interface to be implemented by classes that provide statistics about * raster data. */ public interface GridStatisticsInterface { /** * For returning the number of cells with noDataValues as a BigInteger * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public BigInteger getNonNoDataValueCountBigInteger( boolean _HandleOutOfMemoryError ); /** * For returning the number of cells with noDataValues as a long * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public long getNonNoDataValueCountLong( boolean _HandleOutOfMemoryError ); /** * For returning the number of cells with noDataValues as a int * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public int getNonNoDataValueCountInt( boolean _HandleOutOfMemoryError ); /** * For returning the sum of all non noDataValues as a BigDecimal * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public BigDecimal getSumBigDecimal( boolean _HandleOutOfMemoryError ); /** * For returning the sum of all non noDataValues as a BigInteger * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public BigInteger getSumBigInteger( boolean _HandleOutOfMemoryError ); /** * For returning the sum of all non noDataValues as a double * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public double getSumDouble( boolean _HandleOutOfMemoryError ); /** * For returning the sum of all non noDataValues as a long */ public long getSumLong( boolean _HandleOutOfMemoryError ); /** * For returning the sum of all non noDataValues as a int * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public int getSumInt( boolean _HandleOutOfMemoryError ); /** * For returning the minimum of all non noDataValues as a BigDecimal * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public BigDecimal getMinBigDecimal( boolean _HandleOutOfMemoryError ); /** * For returning the minimum of all non noDataValues as a BigInteger * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public BigInteger getMinBigInteger( boolean _HandleOutOfMemoryError ); /** * For returning the minimum of all non noDataValues as a double * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public double getMinDouble( boolean _HandleOutOfMemoryError ); /** * For returning the minimum of all non noDataValues as a long */ public long getMinLong( boolean _HandleOutOfMemoryError ); /** * For returning the minimum of all non noDataValues as a int * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public int getMinInt( boolean _HandleOutOfMemoryError ); /** * For returning the maximum of all non noDataValues as a BigDecimal * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public BigDecimal getMaxBigDecimal( boolean _HandleOutOfMemoryError ); /** * For returning the maximum of all non noDataValues as a BigInteger * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public BigInteger getMaxBigInteger( boolean _HandleOutOfMemoryError ); /** * For returning the minimum of all non noDataValues as a double * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public double getMaxDouble( boolean _HandleOutOfMemoryError ); /** * For returning the minimum of all non noDataValues as a long * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public long getMaxLong( boolean _HandleOutOfMemoryError ); /** * For returning the minimum of all non noDataValues as a int * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public int getMaxInt( boolean _HandleOutOfMemoryError ); /** * For returning the arithmetic mean of all non noDataValues as a BigDecimal * @param numberOfDecimalPlaces The number of decimal places to which * the result is precise. * @param _HandleOutOfMemoryError * If true then OutOfMemoryErrors are caught, swap operations are * initiated, then the method is re-called. * If false then OutOfMemoryErrors are caught and thrown. */ public BigDecimal getArithmeticMeanBigDecimal( int numberOfDecimalPlaces, boolean _HandleOutOfMemoryError ); // /** // * For returning the arithmetic mean of all non noDataValues as a double // * @param _HandleOutOfMemoryError // * If true then OutOfMemoryErrors are caught, swap operations are // * initiated, then the method is re-called. // * If false then OutOfMemoryErrors are caught and thrown. // */ // public double getArithmeticMeanDouble( // boolean _HandleOutOfMemoryError ); // // /** // * For returning the standard deviation of all non noDataValues as a double // * @param _HandleOutOfMemoryError // * If true then OutOfMemoryErrors are caught, swap operations are // * initiated, then the method is re-called. // * If false then OutOfMemoryErrors are caught and thrown. // */ // public double getStandardDeviationDouble( // boolean _HandleOutOfMemoryError ); // // /** // * For returning the geometric mean of all non noDataValues as a double // * @param _HandleOutOfMemoryError // * If true then OutOfMemoryErrors are caught, swap operations are // * initiated, then the method is re-called. // * If false then OutOfMemoryErrors are caught and thrown. // */ // public double getGeometricMeanDouble( // boolean _HandleOutOfMemoryError ); // // /** // * For returning the arithmetic mean of all non noDataValues as a double // * @param _HandleOutOfMemoryError // * If true then OutOfMemoryErrors are caught, swap operations are // * initiated, then the method is re-called. // * If false then OutOfMemoryErrors are caught and thrown. // */ // public double getHarmonicMeanDouble( // boolean _HandleOutOfMemoryError ); // // /** // * For returning the median of all non noDataValues as a double // * @param _HandleOutOfMemoryError // * If true then OutOfMemoryErrors are caught, swap operations are // * initiated, then the method is re-called. // * If false then OutOfMemoryErrors are caught and thrown. // */ // public double getMedianDouble( // boolean _HandleOutOfMemoryError ); // // /** // * For returning the number of different values. // * @param _HandleOutOfMemoryError // * If true then OutOfMemoryErrors are caught, swap operations are // * initiated, then the method is re-called. // * If false then OutOfMemoryErrors are caught and thrown. // */ // public BigInteger getDiversity( // boolean _HandleOutOfMemoryError ); }