uk.ac.leeds.ccg.andyt.grids.core
Class Grid2DSquareCellDouble

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.core.OutOfMemoryErrorHandler
      extended by uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell
          extended by uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble
All Implemented Interfaces:
java.io.Serializable

public class Grid2DSquareCellDouble
extends AbstractGrid2DSquareCell
implements java.io.Serializable

A class for representing grids of double precision values.

See Also:
AbstractGrid2DSquareCell, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell
AbstractGrid2DSquareCell.CellID, AbstractGrid2DSquareCell.ChunkID
 
Field Summary
protected  double _NoDataValue
          For storing the NODATA value of the grid, which by default is Double.NEGATIVE_INFINITY.
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell
_ChunkNCols, _ChunkNRows, _Dimensions, _DimensionsScale, _Directory, _Grid2DSquareCellChunks, _GridStatistics, _Name, _NChunkCols, _NChunkRows, _NCols, _NRows, _UnsignedLongPowersOf2
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.core.OutOfMemoryErrorHandler
_Grid2DSquareCells, _HandleOutOfMemoryErrorFalse, _HandleOutOfMemoryErrorTrue, _MemoryReserve, _Runtime
 
Constructor Summary
protected Grid2DSquareCellDouble(AbstractGridStatistics _GridStatistics, java.io.File _Directory, AbstractGrid2DSquareCell _Grid2DSquareCell, AbstractGrid2DSquareCellDoubleChunkFactory grid2DSquareCellDoubleChunkFactory, int _ChunkNRows, int _ChunkNCols, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, double _NoDataValue, java.util.HashSet _Grid2DSquareCells, boolean _HandleOutOfMemoryError)
          Creates a new Grid2DSquareCellDouble based on values in _Grid2DSquareCell.
protected Grid2DSquareCellDouble(AbstractGridStatistics _GridStatistics, java.io.File _Directory, AbstractGrid2DSquareCellDoubleChunkFactory grid2DSquareCellDoubleChunkFactory, int _ChunkNRows, int _ChunkNCols, long _NRows, long _NCols, java.math.BigDecimal[] _Dimensions, double _NoDataValue, java.util.HashSet _Grid2DSquareCells, boolean _HandleOutOfMemoryError)
          Creates a new Grid2DSquareCellDouble with each cell value equal to _NoDataValue and all chunks of the same type.
protected Grid2DSquareCellDouble(AbstractGridStatistics _GridStatistics, java.io.File _Directory, java.io.File gridFile, AbstractGrid2DSquareCellDoubleChunkFactory grid2DSquareCellDoubleChunkFactory, int _ChunkNRows, int _ChunkNCols, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, double _NoDataValue, java.util.HashSet _Grid2DSquareCells, boolean _HandleOutOfMemoryError)
          Creates a new Grid2DSquareCellDouble with values obtained from gridFile.
protected Grid2DSquareCellDouble(java.io.File _Directory, java.io.File gridFile, java.io.ObjectInputStream ois, java.util.HashSet _Grid2DSquareCells, boolean _HandleOutOfMemoryError)
          Creates a new Grid2DSquareCellDouble.
  Grid2DSquareCellDouble(java.util.HashSet _Grid2DSquareCells)
          Creates a new Grid2DSquareCellDouble
 
Method Summary
protected  double addToCell(AbstractGrid2DSquareCell.CellID cellID, double valueToAdd)
           
 double addToCell(AbstractGrid2DSquareCell.CellID cellID, double valueToAdd, boolean _HandleOutOfMemoryError)
           
protected  double addToCell(double x, double y, double valueToAdd)
           
 double addToCell(double x, double y, double valueToAdd, boolean _HandleOutOfMemoryError)
           
protected  double addToCell(long _CellRowIndex, long _CellColIndex, double valueToAdd)
           
 double addToCell(long _CellRowIndex, long _CellColIndex, double valueToAdd, boolean _HandleOutOfMemoryError)
           
 double get_NoDataValue(boolean _HandleOutOfMemoryError)
           
 double getCell(AbstractGrid2DSquareCell.CellID cellID, boolean _HandleOutOfMemoryError)
          For returning the value of the cell with cell ID cellID as a int.
protected  double getCell(AbstractGrid2DSquareCellDoubleChunk grid2DSquareCellChunk, int _ChunkRowIndex, int _ChunkColIndex, int chunkCellRowIndex, int chunkCellColIndex)
           
 double getCell(AbstractGrid2DSquareCellDoubleChunk grid2DSquareCellChunk, int _ChunkRowIndex, int _ChunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, boolean _HandleOutOfMemoryError)
           
protected  double getCell(double x, double y)
          For returning the value of the cell containing point given by x-coordinate x, y-coordinate y as a int.
 double getCell(double x, double y, boolean _HandleOutOfMemoryError)
          For returning the value of the cell containing point given by x-coordinate x, y-coordinate y as a double.
protected  double getCell(long _CellRowIndex, long _CellColIndex)
           
 double getCell(long _CellRowIndex, long _CellColIndex, boolean _HandleOutOfMemoryError)
           
protected  double[] getCells(double x, double y, double distance)
           
 double[] getCells(double x, double y, double distance, boolean _HandleOutOfMemoryError)
           
protected  double[] getCells(double x, double y, long _CellRowIndex, long _CellColIndex, double distance)
           
 double[] getCells(double x, double y, long _CellRowIndex, long _CellColIndex, double distance, boolean _HandleOutOfMemoryError)
           
protected  double[] getCells(long _CellRowIndex, long _CellColIndex, double distance)
           
 double[] getCells(long _CellRowIndex, long _CellColIndex, double distance, boolean _HandleOutOfMemoryError)
           
protected  AbstractGrid2DSquareCellDoubleChunk getGrid2DSquareCellDoubleChunk(AbstractGrid2DSquareCell.ChunkID _ChunkID)
           
 AbstractGrid2DSquareCellDoubleChunk getGrid2DSquareCellDoubleChunk(AbstractGrid2DSquareCell.ChunkID _ChunkID, boolean _HandleOutOfMemoryError)
           
protected  AbstractGrid2DSquareCellDoubleChunk getGrid2DSquareCellDoubleChunk(int _ChunkRowIndex, int _ChunkColIndex)
           
 AbstractGrid2DSquareCellDoubleChunk getGrid2DSquareCellDoubleChunk(int _ChunkRowIndex, int _ChunkColIndex, boolean _HandleOutOfMemoryError)
           
protected  double getNearestValueDouble(double x, double y)
           
 double getNearestValueDouble(double x, double y, boolean _HandleOutOfMemoryError)
           
protected  double getNearestValueDouble(double x, double y, long _CellRowIndex, long _CellColIndex, double _NoDataValue)
           
 double getNearestValueDouble(double x, double y, long _CellRowIndex, long _CellColIndex, double _NoDataValue, boolean _HandleOutOfMemoryError)
           
protected  double getNearestValueDouble(long _CellRowIndex, long _CellColIndex)
           
 double getNearestValueDouble(long _CellRowIndex, long _CellColIndex, boolean _HandleOutOfMemoryError)
           
protected  double getNearestValueDoubleDistance(double x, double y)
           
 double getNearestValueDoubleDistance(double x, double y, boolean _HandleOutOfMemoryError)
           
protected  double getNearestValueDoubleDistance(double x, double y, long _CellRowIndex, long _CellColIndex, double _NoDataValue)
           
 double getNearestValueDoubleDistance(double x, double y, long _CellRowIndex, long _CellColIndex, double _NoDataValue, boolean _HandleOutOfMemoryError)
           
protected  double getNearestValueDoubleDistance(long _CellRowIndex, long _CellColIndex)
           
 double getNearestValueDoubleDistance(long _CellRowIndex, long _CellColIndex, boolean _HandleOutOfMemoryError)
           
protected  AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(double x, double y)
           
 AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(double x, double y, boolean _HandleOutOfMemoryError)
           
protected  AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(double x, double y, long _CellRowIndex, long _CellColIndex, double _NoDataValue)
           
 AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(double x, double y, long _CellRowIndex, long _CellColIndex, double _NoDataValue, boolean _HandleOutOfMemoryError)
           
protected  AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(long _CellRowIndex, long _CellColIndex)
           
 AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(long _CellRowIndex, long _CellColIndex, boolean _HandleOutOfMemoryError)
           
 java.math.BigDecimal getNoDataValueBigDecimal(boolean _HandleOutOfMemoryError)
           
protected  void init_NoDataValue(double _NoDataValue)
          Initialises _NoDataValue.
protected  void initCell(long _CellRowIndex, long _CellColIndex, double valueToInitialise)
          Initilises the value at _CellRowIndex, _CellColIndex
protected  void initCell(long _CellRowIndex, long _CellColIndex, double valueToInitialise, boolean _HandleOutOfMemoryError)
          Initilises the value at _CellRowIndex, _CellColIndex
protected  void initCellFast(long _CellRowIndex, long _CellColIndex, double valueToInitialise)
          Initilises the value at _CellRowIndex, _CellColIndex and does nothing about this._GridStatistics
protected  void initCellFast(long _CellRowIndex, long _CellColIndex, double valueToInitialise, boolean _HandleOutOfMemoryError)
          Initilises the value at _CellRowIndex, _CellColIndex and does nothing about this._GridStatistics
 java.util.Iterator iterator(boolean _HandleOutOfMemoryError)
           
 double setCell(AbstractGrid2DSquareCell.CellID _CellID, double newValue, boolean _HandleOutOfMemoryError)
          For returning the value of the cell with cell ID _CellID and setting it to newValue.
protected  double setCell(AbstractGrid2DSquareCellDoubleChunk grid2DSquareCellChunk, int _ChunkRowIndex, int _ChunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, double newValue)
           
 double setCell(AbstractGrid2DSquareCellDoubleChunk grid2DSquareCellChunk, int _ChunkRowIndex, int _ChunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, double newValue, boolean _HandleOutOfMemoryError)
           
protected  double setCell(double x, double y, double newValue)
          For returning the value at x-coordinate x, y-coordinate y and setting it to newValue.
 double setCell(double x, double y, double newValue, boolean _HandleOutOfMemoryError)
          For returning the value at x-coordinate x, y-coordinate y and setting it to newValue.
protected  double setCell(int _ChunkRowIndex, int _ChunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, double newValue)
          For returning the value of the cell in chunk given by _ChunkRowIndex and _ChunkColIndex and cell in the chunk given by chunkCellColIndex and chunkCellRowIndex and setting it to newValue.
 double setCell(int _ChunkRowIndex, int _ChunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, double newValue, boolean _HandleOutOfMemoryError)
          For returning the value of the cell in chunk given by _ChunkRowIndex and _ChunkColIndex and cell in the chunk given by chunkCellColIndex and chunkCellRowIndex and setting it to newValue.
protected  double setCell(long _CellRowIndex, long _CellColIndex, double newValue)
          For returning the value at _CellRowIndex, _CellColIndex and setting it to newValue.
 java.lang.String toString(boolean _HandleOutOfMemoryError)
           
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell
clearFromCacheGrid2DSquareCellChunk, clearFromCacheGrid2DSquareCellChunk, clearFromCacheGrid2DSquareCellChunkExcept, clearFromCacheGrid2DSquareCellChunkExcept, clearFromCacheGrid2DSquareCellChunks, clearFromCacheGrid2DSquareCellChunks, clearFromCacheGrid2DSquareCellChunks, clearFromCacheGrid2DSquareCellChunks, clearFromCacheGrid2DSquareCellChunksExcept, clearFromCacheGrid2DSquareCellChunksExcept, clearFromCacheGrid2DSquareCellChunksExcept, clearFromCacheGrid2DSquareCellChunksExcept, get_ChunkNCols, get_ChunkNCols, get_ChunkNCols, get_ChunkNCols, get_ChunkNCols, get_ChunkNRows, get_ChunkNRows, get_ChunkNRows, get_ChunkNRows, get_Dimensions, get_DimensionsScale, get_Directory, get_Directory, get_Name, get_Name, get_NChunkCols, get_NChunkCols, get_NChunkRows, get_NChunkRows, get_NCols, get_NRows, getBasicDescription, getBasicDescription, getCellBoundsDoubleArray, getCellBoundsDoubleArray, getCellBoundsDoubleArray, getCellBoundsDoubleArray, getCellColIndex, getCellColIndex, getCellColIndex, getCellColIndex, getCellColIndex, getCellColIndex, getCellColIndex, getCellDouble, getCellDouble, getCellDouble, getCellDouble, getCellDouble, getCellDouble, getCellDouble, getCellDouble, getCellDouble, getCellDouble, getCellID, getCellID, getCellID, getCellID, getCellIDs, getCellIDs, getCellIDs, getCellIDs, getCellIDs, getCellIDs, getCellInt, getCellInt, getCellInt, getCellInt, getCellInt, getCellInt, getCellRowIndex, getCellRowIndex, getCellRowIndex, getCellRowIndex, getCellRowIndex, getCellRowIndex, getCellRowIndex, getCellRowIndex, getCellsizeDouble, getCellXBigDecimal, getCellXBigDecimal, getCellXBigDecimal, getCellXBigDecimal, getCellXBigDecimal, getCellXBigDecimal, getCellXDouble, getCellXDouble, getCellXDouble, getCellXDouble, getCellXDouble, getCellXDouble, getCellXDouble, getCellXDouble, getCellYBigDecimal, getCellYBigDecimal, getCellYBigDecimal, getCellYBigDecimal, getCellYBigDecimal, getCellYBigDecimal, getCellYDouble, getCellYDouble, getCellYDouble, getCellYDouble, getCellYDouble, getCellYDouble, getCellYDouble, getCellYDouble, getChunkCellColIndex, getChunkCellColIndex, getChunkCellColIndex, getChunkCellColIndex, getChunkCellRowIndex, getChunkCellRowIndex, getChunkCellRowIndex, getChunkCellRowIndex, getChunkColIndex, getChunkColIndex, getChunkColIndex, getChunkColIndex, getChunkIDs, getChunkNCols, getChunkNCols, getChunkNcolsFinalColChunks, getChunkNcolsFinalColChunks, getChunkNRows, getChunkNRows, getChunkNrowsFinalRowChunks, getChunkNrowsFinalRowChunks, getChunkRowIndex, getChunkRowIndex, getChunkRowIndex, getChunkRowIndex, getGrid2DSquareCellChunk, getGrid2DSquareCellChunk, getGrid2DSquareCellChunk, getGrid2DSquareCellChunk, getGrid2DSquareCellChunkIDHashSet, getGrid2DSquareCellChunkIDHashSet, getGrid2DSquareCells, getGridBounds, getGridBounds, getGridStatistics, getGridStatistics, getHeightBigDecimal, getHeightBigDecimal, getHeightDouble, getHeightDouble, getNChunks, getNChunks, getNearestCellID, getNearestCellID, getNearestCellID, getNearestCellID, getNearestCellID, getNearestCellID, getNextChunk, getNextChunk, getNextChunkRowMinor, getNextChunkRowMinor, getPreviousChunk, getPreviousChunk, getWidthBigDecimal, getWidthBigDecimal, getWidthDouble, getWidthDouble, init_Dimensions, init_NChunkCols, init_NChunkRows, initGrid2DSquareCell, initGrid2DSquareCell, initGrid2DSquareCellChunks, isInCache, isInCache, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, isInGrid, loadIntoCacheChunk, loadIntoCacheChunk, loadIntoCacheChunk, loadIntoCacheChunk, loadObject, loadObject, loadObject, set_Name, setCell, setCell, setCell, setChunk, setName, swapToFileGrid2DSquareCellChunk, swapToFileGrid2DSquareCellChunk, swapToFileGrid2DSquareCellChunkExcept, swapToFileGrid2DSquareCellChunkExcept, swapToFileGrid2DSquareCellChunkExcept, swapToFileGrid2DSquareCellChunkExcept, swapToFileGrid2DSquareCellChunks, swapToFileGrid2DSquareCellChunks, swapToFileGrid2DSquareCellChunks, swapToFileGrid2DSquareCellChunks, swapToFileGrid2DSquareCellChunksExcept, swapToFileGrid2DSquareCellChunksExcept, swapToFileGrid2DSquareCellChunksExcept, swapToFileGrid2DSquareCellChunksExcept, toString, toString, writeToFile, writeToFile, writeToFileGrid2DSquareCellChunk, writeToFileGrid2DSquareCellChunk, writeToFileGrid2DSquareCellChunk, writeToFileGrid2DSquareCellChunk, writeToFileGrid2DSquareCellChunk, writeToFileGrid2DSquareCellChunk, writeToFileGrid2DSquareCellChunkExcept, writeToFileGrid2DSquareCellChunkExcept, writeToFileGrid2DSquareCellChunkExcept, writeToFileGrid2DSquareCellChunkExcept, writeToFileGrid2DSquareCellChunkExceptReverseOrder, writeToFileGrid2DSquareCellChunkExceptReverseOrder, writeToFileGrid2DSquareCellChunkExceptReverseOrder, writeToFileGrid2DSquareCellChunkExceptReverseOrder, writeToFileGrid2DSquareCellChunks, writeToFileGrid2DSquareCellChunks, writeToFileGrid2DSquareCellChunks, writeToFileGrid2DSquareCellChunks, writeToFileGrid2DSquareCellChunksExcept, writeToFileGrid2DSquareCellChunksExcept, writeToFileGrid2DSquareCellChunksExcept, writeToFileGrid2DSquareCellChunksExcept
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.OutOfMemoryErrorHandler
_EnsureThereIsEnoughMemoryToContinue, _SwapToFileGrid2DSquareCellChunk, _SwapToFileGrid2DSquareCellChunk, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunkExcept, _SwapToFileGrid2DSquareCellChunks, _SwapToFileGrid2DSquareCellChunks, _SwapToFileGrid2DSquareCellChunksExcept, _SwapToFileGrid2DSquareCellChunksExcept, _SwapToFileGrid2DSquareCellChunksExcept, _SwapToFileGrid2DSquareCellChunksExcept, _SwapToFileGrid2DSquareCellChunksExcept, _SwapToFileGrid2DSquareCellChunksExcept, _SwapToFileGrid2DSquareCellChunksExcept, _SwapToFileGrid2DSquareCellChunksExcept, _SwapToFileGrid2DSquareCellChunksExcept, clear_MemoryReserve, get_Grid2DSquareCells, get_MemoryReserve, getNormalDistributionKernelWeights, getTotalFreeMemory, getTotalFreeMemory, init_Grid2DSquareCells_MemoryReserve, init_Grid2DSquareCells_MemoryReserve, init_Grid2DSquareCells, init_Grid2DSquareCells, init_MemoryReserve, init_MemoryReserve, init_MemoryReserve, init_MemoryReserve, init_MemoryReserve, init_MemoryReserve, init_Runtime, initFile, initFile, initFileDirectory, initString, initString, println, set_Grid2DSquareCells, set_Grid2DSquareCells, sin, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_NoDataValue

protected double _NoDataValue
For storing the NODATA value of the grid, which by default is Double.NEGATIVE_INFINITY. N.B. Double.NaN should not be used. N.B. Care should be taken so that _NoDataValue is not a data value.

Constructor Detail

Grid2DSquareCellDouble

public Grid2DSquareCellDouble(java.util.HashSet _Grid2DSquareCells)
Creates a new Grid2DSquareCellDouble


Grid2DSquareCellDouble

protected Grid2DSquareCellDouble(java.io.File _Directory,
                                 java.io.File gridFile,
                                 java.io.ObjectInputStream ois,
                                 java.util.HashSet _Grid2DSquareCells,
                                 boolean _HandleOutOfMemoryError)
Creates a new Grid2DSquareCellDouble. Warning!! Concurrent modification may occur if _Directory is in use. If a completely new instance is wanted then use: Grid2DSquareCellDouble( File, Grid2DSquareCellDoubleAbstract, AbstractGrid2DSquareCellDoubleChunkFactory, int, int, long, long, long, long, double, HashSet) which can be accessed via a Grid2DSquareCellDoubleFactory.

Parameters:
_Directory - The File _Directory to be used for swapping.
gridFile - The File _Directory containing the File names thisFile that the ois was constructed from.
ois - The ObjectInputStream used in first attempt to construct this.
_Grid2DSquareCells - A HashSet of swappable AbstractGrid2DSquareCell instances.
_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.

Grid2DSquareCellDouble

protected Grid2DSquareCellDouble(AbstractGridStatistics _GridStatistics,
                                 java.io.File _Directory,
                                 AbstractGrid2DSquareCellDoubleChunkFactory grid2DSquareCellDoubleChunkFactory,
                                 int _ChunkNRows,
                                 int _ChunkNCols,
                                 long _NRows,
                                 long _NCols,
                                 java.math.BigDecimal[] _Dimensions,
                                 double _NoDataValue,
                                 java.util.HashSet _Grid2DSquareCells,
                                 boolean _HandleOutOfMemoryError)
Creates a new Grid2DSquareCellDouble with each cell value equal to _NoDataValue and all chunks of the same type.

Parameters:
_GridStatistics - The AbstractGridStatistics to accompany this.
_Directory - The File _Directory to be used for swapping.
grid2DSquareCellDoubleChunkFactory - The AbstractGrid2DSquareCellDoubleChunkFactory prefered for creating chunks.
_ChunkNRows - The number of rows of cells in any chunk.
_ChunkNCols - The number of columns of cells in any chunk.
_NRows - The number of rows of cells.
_NCols - The number of columns of cells.
_Dimensions - The cellsize, xmin, ymin, xmax and ymax.
_NoDataValue - The _NoDataValue.
_Grid2DSquareCells - A HashSet of swappable AbstractGrid2DSquareCell instances.
_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.

Grid2DSquareCellDouble

protected Grid2DSquareCellDouble(AbstractGridStatistics _GridStatistics,
                                 java.io.File _Directory,
                                 AbstractGrid2DSquareCell _Grid2DSquareCell,
                                 AbstractGrid2DSquareCellDoubleChunkFactory grid2DSquareCellDoubleChunkFactory,
                                 int _ChunkNRows,
                                 int _ChunkNCols,
                                 long startRowIndex,
                                 long startColIndex,
                                 long endRowIndex,
                                 long endColIndex,
                                 double _NoDataValue,
                                 java.util.HashSet _Grid2DSquareCells,
                                 boolean _HandleOutOfMemoryError)
Creates a new Grid2DSquareCellDouble based on values in _Grid2DSquareCell.

Parameters:
_GridStatistics - The AbstractGridStatistics to accompany this.
_Directory - The File _Directory to be used for swapping.
_Grid2DSquareCell - The AbstractGrid2DSquareCell from which this is to be constructed.
grid2DSquareCellDoubleChunkFactory - The AbstractGrid2DSquareCellDoubleChunkFactory prefered to construct chunks of this.
_ChunkNRows - The number of rows of cells in any chunk.
_ChunkNCols - The number of columns of cells in any chunk.
startRowIndex - The _Grid2DSquareCell row index which is the bottom most row of this.
startColIndex - The _Grid2DSquareCell column index which is the left most column of this.
endRowIndex - The _Grid2DSquareCell row index which is the top most row of this.
endColIndex - The _Grid2DSquareCell column index which is the right most column of this.
_NoDataValue - The _NoDataValue for this.
_Grid2DSquareCells - A HashSet of swappable AbstractGrid2DSquareCell instances.
_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.

Grid2DSquareCellDouble

protected Grid2DSquareCellDouble(AbstractGridStatistics _GridStatistics,
                                 java.io.File _Directory,
                                 java.io.File gridFile,
                                 AbstractGrid2DSquareCellDoubleChunkFactory grid2DSquareCellDoubleChunkFactory,
                                 int _ChunkNRows,
                                 int _ChunkNCols,
                                 long startRowIndex,
                                 long startColIndex,
                                 long endRowIndex,
                                 long endColIndex,
                                 double _NoDataValue,
                                 java.util.HashSet _Grid2DSquareCells,
                                 boolean _HandleOutOfMemoryError)
Creates a new Grid2DSquareCellDouble with values obtained from gridFile. Currently gridFile must be a _Directory of a Grid2DSquareCellDouble or Grid2DSquareCellInt or a ESRI Asciigrid format file with a _Name ending ".asc".

Parameters:
_GridStatistics - The AbstractGridStatistics to accompany this.
_Directory - The File _Directory to be used for swapping.
gridFile - Either a _Directory, or a formatted File with a specific extension containing the data and information about the Grid2DSquareCellDouble to be returned.
grid2DSquareCellDoubleChunkFactory - The AbstractGrid2DSquareCellDoubleChunkFactory prefered to construct chunks of this.
startRowIndex - The _Grid2DSquareCell row index which is the bottom most row of this.
startColIndex - The _Grid2DSquareCell column index which is the left most column of this.
endRowIndex - The _Grid2DSquareCell row index which is the top most row of this.
endColIndex - The _Grid2DSquareCell column index which is the right most column of this.
_NoDataValue - The _NoDataValue for this.
_Grid2DSquareCells - A HashSet of swappable AbstractGrid2DSquareCell instances.
_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.
Method Detail

toString

public java.lang.String toString(boolean _HandleOutOfMemoryError)
Specified by:
toString in class AbstractGrid2DSquareCell
Parameters:
_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.
Returns:
a string description of the instance. Basically the values of each field.

getGrid2DSquareCellDoubleChunk

public AbstractGrid2DSquareCellDoubleChunk getGrid2DSquareCellDoubleChunk(int _ChunkRowIndex,
                                                                          int _ChunkColIndex,
                                                                          boolean _HandleOutOfMemoryError)
Parameters:
_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.
Returns:
grid2DSquareCellDoubleChunks.

getGrid2DSquareCellDoubleChunk

protected AbstractGrid2DSquareCellDoubleChunk getGrid2DSquareCellDoubleChunk(int _ChunkRowIndex,
                                                                             int _ChunkColIndex)
Returns:
grid2DSquareCellDoubleChunks.

getGrid2DSquareCellDoubleChunk

public AbstractGrid2DSquareCellDoubleChunk getGrid2DSquareCellDoubleChunk(AbstractGrid2DSquareCell.ChunkID _ChunkID,
                                                                          boolean _HandleOutOfMemoryError)
Parameters:
_ChunkID -
_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.
Returns:
grid2DSquareCellDoubleChunksAbstract for the given ChunkID

getGrid2DSquareCellDoubleChunk

protected AbstractGrid2DSquareCellDoubleChunk getGrid2DSquareCellDoubleChunk(AbstractGrid2DSquareCell.ChunkID _ChunkID)
Parameters:
_ChunkID -
Returns:
grid2DSquareCellDoubleChunksAbstract for the given ChunkID

get_NoDataValue

public final double get_NoDataValue(boolean _HandleOutOfMemoryError)
Parameters:
_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.
Returns:
_NoDataValue.

getNoDataValueBigDecimal

public java.math.BigDecimal getNoDataValueBigDecimal(boolean _HandleOutOfMemoryError)
Specified by:
getNoDataValueBigDecimal in class AbstractGrid2DSquareCell
Parameters:
_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.
Returns:
the _NoDataValue of this as a BigDecimal.

init_NoDataValue

protected final void init_NoDataValue(double _NoDataValue)
Initialises _NoDataValue.

Parameters:
_NoDataValue - The value this._NoDataValue is initialised to.

getCell

public double getCell(long _CellRowIndex,
                      long _CellColIndex,
                      boolean _HandleOutOfMemoryError)
Parameters:
_CellRowIndex - .
_CellColIndex - .
_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.
Returns:
Value at _CellRowIndex, _CellColIndex else returns _NoDataValue.

getCell

protected double getCell(long _CellRowIndex,
                         long _CellColIndex)
Parameters:
_CellRowIndex - .
_CellColIndex - .
Returns:
Value at _CellRowIndex, _CellColIndex else returns _NoDataValue.

getCell

public double getCell(AbstractGrid2DSquareCellDoubleChunk grid2DSquareCellChunk,
                      int _ChunkRowIndex,
                      int _ChunkColIndex,
                      int chunkCellRowIndex,
                      int chunkCellColIndex,
                      boolean _HandleOutOfMemoryError)
Parameters:
_ChunkRowIndex - The chunk row index of the cell thats value is returned.
_ChunkColIndex - The chunk column index of the cell thats value is returned.
chunkCellRowIndex - The chunk cell row index of the cell thats value is returned.
chunkCellColIndex - The chunk cell column index of the cell thats value is returned.
_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.
Returns:
Value at position given by chunk row index _ChunkRowIndex, chunk column index _ChunkColIndex, chunk cell row index chunkCellRowIndex, chunk cell column index chunkCellColIndex.

getCell

protected double getCell(AbstractGrid2DSquareCellDoubleChunk grid2DSquareCellChunk,
                         int _ChunkRowIndex,
                         int _ChunkColIndex,
                         int chunkCellRowIndex,
                         int chunkCellColIndex)
Parameters:
_ChunkRowIndex - The chunk row index of the cell thats value is returned.
_ChunkColIndex - The chunk column index of the cell thats value is returned.
chunkCellRowIndex - The chunk cell row index of the cell thats value is returned.
chunkCellColIndex - The chunk cell column index of the cell thats value is returned.
Returns:
Value at position given by chunk row index _ChunkRowIndex, chunk column index _ChunkColIndex, chunk cell row index chunkCellRowIndex, chunk cell column index chunkCellColIndex.

getCell

public final double getCell(double x,
                            double y,
                            boolean _HandleOutOfMemoryError)
For returning the value of the cell containing point given by x-coordinate x, y-coordinate y as a double.

Parameters:
x - the x-coordinate of the point.
y - the y-coordinate of the point.
_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.

getCell

protected final double getCell(double x,
                               double y)
For returning the value of the cell containing point given by x-coordinate x, y-coordinate y as a int.

Parameters:
x - the x-coordinate of the point.
y - the y-coordinate of the point.

getCell

public final double getCell(AbstractGrid2DSquareCell.CellID cellID,
                            boolean _HandleOutOfMemoryError)
For returning the value of the cell with cell ID cellID as a int.

Parameters:
cellID - the CellID of the cell.
_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.

setCell

public final double setCell(double x,
                            double y,
                            double newValue,
                            boolean _HandleOutOfMemoryError)
For returning the value at x-coordinate x, y-coordinate y and setting it to newValue.

Parameters:
x - the x-coordinate of the point.
y - the y-coordinate of the point.
newValue - .
_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.

setCell

protected final double setCell(double x,
                               double y,
                               double newValue)
For returning the value at x-coordinate x, y-coordinate y and setting it to newValue.

Parameters:
x - the x-coordinate of the point.
y - the y-coordinate of the point.
newValue - .

setCell

public final double setCell(AbstractGrid2DSquareCell.CellID _CellID,
                            double newValue,
                            boolean _HandleOutOfMemoryError)
For returning the value of the cell with cell ID _CellID and setting it to newValue.

Parameters:
_CellID - the CellID of the cell.
newValue - .
_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.

setCell

protected double setCell(long _CellRowIndex,
                         long _CellColIndex,
                         double newValue)
For returning the value at _CellRowIndex, _CellColIndex and setting it to newValue.

Specified by:
setCell in class AbstractGrid2DSquareCell
Parameters:
_CellRowIndex - .
_CellColIndex - .
newValue - .

setCell

public double setCell(int _ChunkRowIndex,
                      int _ChunkColIndex,
                      int chunkCellRowIndex,
                      int chunkCellColIndex,
                      double newValue,
                      boolean _HandleOutOfMemoryError)
For returning the value of the cell in chunk given by _ChunkRowIndex and _ChunkColIndex and cell in the chunk given by chunkCellColIndex and chunkCellRowIndex and setting it to newValue.

Parameters:
_ChunkRowIndex -
_ChunkColIndex -
chunkCellRowIndex -
chunkCellColIndex -
newValue -
_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.

setCell

protected double setCell(int _ChunkRowIndex,
                         int _ChunkColIndex,
                         int chunkCellRowIndex,
                         int chunkCellColIndex,
                         double newValue)
For returning the value of the cell in chunk given by _ChunkRowIndex and _ChunkColIndex and cell in the chunk given by chunkCellColIndex and chunkCellRowIndex and setting it to newValue.

Parameters:
_ChunkRowIndex -
_ChunkColIndex -
chunkCellRowIndex -
chunkCellColIndex -
newValue -

setCell

public double setCell(AbstractGrid2DSquareCellDoubleChunk grid2DSquareCellChunk,
                      int _ChunkRowIndex,
                      int _ChunkColIndex,
                      int chunkCellRowIndex,
                      int chunkCellColIndex,
                      double newValue,
                      boolean _HandleOutOfMemoryError)
Parameters:
_ChunkRowIndex - .
_ChunkColIndex - .
newValue - .
_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.
Returns:
Value at _CellRowIndex, _CellColIndex and sets it to newValue.

setCell

protected double setCell(AbstractGrid2DSquareCellDoubleChunk grid2DSquareCellChunk,
                         int _ChunkRowIndex,
                         int _ChunkColIndex,
                         int chunkCellRowIndex,
                         int chunkCellColIndex,
                         double newValue)
Parameters:
_ChunkRowIndex - .
_ChunkColIndex - .
newValue - .
Returns:
Value at _CellRowIndex, _CellColIndex and sets it to newValue.

initCell

protected void initCell(long _CellRowIndex,
                        long _CellColIndex,
                        double valueToInitialise,
                        boolean _HandleOutOfMemoryError)
Initilises the value at _CellRowIndex, _CellColIndex

Parameters:
_CellRowIndex -
_CellColIndex -
valueToInitialise -
_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.

initCell

protected void initCell(long _CellRowIndex,
                        long _CellColIndex,
                        double valueToInitialise)
Initilises the value at _CellRowIndex, _CellColIndex

Parameters:
_CellRowIndex -
_CellColIndex -
valueToInitialise -

initCellFast

protected void initCellFast(long _CellRowIndex,
                            long _CellColIndex,
                            double valueToInitialise,
                            boolean _HandleOutOfMemoryError)
Initilises the value at _CellRowIndex, _CellColIndex and does nothing about this._GridStatistics

Parameters:
_CellRowIndex -
_CellColIndex -
valueToInitialise -
_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.

initCellFast

protected void initCellFast(long _CellRowIndex,
                            long _CellColIndex,
                            double valueToInitialise)
Initilises the value at _CellRowIndex, _CellColIndex and does nothing about this._GridStatistics

Parameters:
_CellRowIndex -
_CellColIndex -
valueToInitialise -

getCells

public double[] getCells(double x,
                         double y,
                         double distance,
                         boolean _HandleOutOfMemoryError)
Parameters:
x - the x-coordinate of the circle centre from which cell values are returned.
y - the y-coordinate of the circle centre from which cell values are returned.
distance - the radius of the circle for which intersected cell values are returned.
_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.
Returns:
double[] of all cell values for cells thats centroids are intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance.

getCells

protected double[] getCells(double x,
                            double y,
                            double distance)
Parameters:
x - the x-coordinate of the circle centre from which cell values are returned.
y - the y-coordinate of the circle centre from which cell values are returned.
distance - the radius of the circle for which intersected cell values are returned.
Returns:
double[] of all cell values for cells thats centroids are intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance.

getCells

public double[] getCells(long _CellRowIndex,
                         long _CellColIndex,
                         double distance,
                         boolean _HandleOutOfMemoryError)
Parameters:
_CellRowIndex - the row index for the cell thats centroid is the circle centre from which cell values are returned.
_CellColIndex - the column index for the cell thats centroid is the circle centre from which cell values are returned.
distance - the radius of the circle for which intersected cell values are returned.
_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.
Returns:
double[] of all cell values for cells thats centroids are intersected by circle with centre at centroid of cell given by cell row index _CellRowIndex, cell column index _CellColIndex, and radius distance.

getCells

protected double[] getCells(long _CellRowIndex,
                            long _CellColIndex,
                            double distance)
Parameters:
_CellRowIndex - the row index for the cell thats centroid is the circle centre from which cell values are returned.
_CellColIndex - the column index for the cell thats centroid is the circle centre from which cell values are returned.
distance - the radius of the circle for which intersected cell values are returned.
Returns:
double[] of all cell values for cells thats centroids are intersected by circle with centre at centroid of cell given by cell row index _CellRowIndex, cell column index _CellColIndex, and radius distance.

getCells

public double[] getCells(double x,
                         double y,
                         long _CellRowIndex,
                         long _CellColIndex,
                         double distance,
                         boolean _HandleOutOfMemoryError)
Parameters:
x - The x-coordinate of the circle centre from which cell values are returned.
y - The y-coordinate of the circle centre from which cell values are returned.
_CellRowIndex - The row index at y.
_CellColIndex - The col index at x.
distance - The radius of the circle for which intersected cell values are returned.
_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.
Returns:
double[] of all cell values for cells thats centroids are intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance.

getCells

protected double[] getCells(double x,
                            double y,
                            long _CellRowIndex,
                            long _CellColIndex,
                            double distance)
Parameters:
x - The x-coordinate of the circle centre from which cell values are returned.
y - The y-coordinate of the circle centre from which cell values are returned.
_CellRowIndex - The row index at y.
_CellColIndex - The col index at x.
distance - The radius of the circle for which intersected cell values are returned.
Returns:
double[] of all cell values for cells thats centroids are intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance.

getNearestValueDouble

public double getNearestValueDouble(double x,
                                    double y,
                                    boolean _HandleOutOfMemoryError)
Parameters:
x - the x-coordinate of the point
y - the y-coordinate of the point
_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.
Returns:
the average of the nearest data values to point given by x-coordinate x, y-coordinate y as a double.

getNearestValueDouble

protected double getNearestValueDouble(double x,
                                       double y)
Parameters:
x - the x-coordinate of the point
y - the y-coordinate of the point
Returns:
the average of the nearest data values to point given by x-coordinate x, y-coordinate y as a double.

getNearestValueDouble

public double getNearestValueDouble(long _CellRowIndex,
                                    long _CellColIndex,
                                    boolean _HandleOutOfMemoryError)
Parameters:
_CellRowIndex - the row index from which average of the nearest data values is returned
_CellColIndex - the column index from which average of the nearest data values is returned
_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.
Returns:
the average of the nearest data values to position given by row index rowIndex, column index colIndex

getNearestValueDouble

protected double getNearestValueDouble(long _CellRowIndex,
                                       long _CellColIndex)
Parameters:
_CellRowIndex - the row index from which average of the nearest data values is returned
_CellColIndex - the column index from which average of the nearest data values is returned
Returns:
the average of the nearest data values to position given by row index rowIndex, column index colIndex

getNearestValueDouble

public double getNearestValueDouble(double x,
                                    double y,
                                    long _CellRowIndex,
                                    long _CellColIndex,
                                    double _NoDataValue,
                                    boolean _HandleOutOfMemoryError)
Parameters:
x - the x-coordinate of the point
y - the y-coordinate of the point
_CellRowIndex - the row index from which average of the nearest data values is returned
_CellColIndex - the column index from which average of the nearest data values is returned
_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.
Returns:
the average of the nearest data values to point given by x-coordinate x, y-coordinate y in position given by row index rowIndex, column index colIndex

getNearestValueDouble

protected double getNearestValueDouble(double x,
                                       double y,
                                       long _CellRowIndex,
                                       long _CellColIndex,
                                       double _NoDataValue)
Parameters:
x - the x-coordinate of the point
y - the y-coordinate of the point
_CellRowIndex - the row index from which average of the nearest data values is returned
_CellColIndex - the column index from which average of the nearest data values is returned
Returns:
the average of the nearest data values to point given by x-coordinate x, y-coordinate y in position given by row index rowIndex, column index colIndex

getNearestValuesCellIDs

public AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(double x,
                                                                 double y,
                                                                 boolean _HandleOutOfMemoryError)
Parameters:
x - The x-coordinate of the point.
y - The y-coordinate of the point.
_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.
Returns:
a CellID[] - The CellIDs of the nearest cells with data values to point given by x-coordinate x, y-coordinate y.

getNearestValuesCellIDs

protected AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(double x,
                                                                    double y)
Parameters:
x - The x-coordinate of the point.
y - The y-coordinate of the point.
Returns:
a CellID[] - The CellIDs of the nearest cells with data values to point given by x-coordinate x, y-coordinate y.

getNearestValuesCellIDs

public AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(long _CellRowIndex,
                                                                 long _CellColIndex,
                                                                 boolean _HandleOutOfMemoryError)
Parameters:
_CellRowIndex - The row index from which the cell IDs of the nearest cells with data values are returned.
_CellColIndex - The column index from which the cell IDs of the nearest cells with data values are returned.
_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.
Returns:
a CellID[] - The CellIDs of the nearest cells with data values to position given by row index rowIndex, column index colIndex.

getNearestValuesCellIDs

protected AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(long _CellRowIndex,
                                                                    long _CellColIndex)
Parameters:
_CellRowIndex - The row index from which the cell IDs of the nearest cells with data values are returned.
_CellColIndex - The column index from which the cell IDs of the nearest cells with data values are returned.
Returns:
a CellID[] - The CellIDs of the nearest cells with data values to position given by row index rowIndex, column index colIndex.

getNearestValuesCellIDs

public AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(double x,
                                                                 double y,
                                                                 long _CellRowIndex,
                                                                 long _CellColIndex,
                                                                 double _NoDataValue,
                                                                 boolean _HandleOutOfMemoryError)
Parameters:
x - the x-coordinate of the point
y - the y-coordinate of the point
_CellRowIndex - The row index from which the cell IDs of the nearest cells with data values are returned.
_CellColIndex - The column index from which the cell IDs of the nearest cells with data values are returned.
_NoDataValue - the no data value of the grid
_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.
Returns:
a CellID[] - The CellIDs of the nearest cells with data values nearest to point with position given by: x-coordinate x, y-coordinate y; and, cell row index _CellRowIndex, cell column index _CellColIndex.

getNearestValuesCellIDs

protected AbstractGrid2DSquareCell.CellID[] getNearestValuesCellIDs(double x,
                                                                    double y,
                                                                    long _CellRowIndex,
                                                                    long _CellColIndex,
                                                                    double _NoDataValue)
Parameters:
x - the x-coordinate of the point
y - the y-coordinate of the point
_CellRowIndex - The row index from which the cell IDs of the nearest cells with data values are returned.
_CellColIndex - The column index from which the cell IDs of the nearest cells with data values are returned.
_NoDataValue - the no data value of the grid
Returns:
a CellID[] - The CellIDs of the nearest cells with data values nearest to point with position given by: x-coordinate x, y-coordinate y; and, cell row index _CellRowIndex, cell column index _CellColIndex.

getNearestValueDoubleDistance

public double getNearestValueDoubleDistance(double x,
                                            double y,
                                            boolean _HandleOutOfMemoryError)
Parameters:
x - The x-coordinate of the point.
y - The y-coordinate of the point.
_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.
Returns:
the distance to the nearest data value from point given by x-coordinate x, y-coordinate y as a double.

getNearestValueDoubleDistance

protected double getNearestValueDoubleDistance(double x,
                                               double y)
Parameters:
x - The x-coordinate of the point.
y - The y-coordinate of the point.
Returns:
the distance to the nearest data value from point given by x-coordinate x, y-coordinate y as a double.

getNearestValueDoubleDistance

public double getNearestValueDoubleDistance(long _CellRowIndex,
                                            long _CellColIndex,
                                            boolean _HandleOutOfMemoryError)
Parameters:
_CellRowIndex - The cell row index of the cell from which the distance nearest to the nearest cell value is returned.
_CellColIndex - The cell column index of the cell from which the distance nearest to the nearest cell value is returned.
_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.
Returns:
the distance to the nearest data value from position given by row index rowIndex, column index colIndex as a double.

getNearestValueDoubleDistance

protected double getNearestValueDoubleDistance(long _CellRowIndex,
                                               long _CellColIndex)
Parameters:
_CellRowIndex - The cell row index of the cell from which the distance nearest to the nearest cell value is returned.
_CellColIndex - The cell column index of the cell from which the distance nearest to the nearest cell value is returned.
Returns:
the distance to the nearest data value from position given by row index rowIndex, column index colIndex as a double.

getNearestValueDoubleDistance

public double getNearestValueDoubleDistance(double x,
                                            double y,
                                            long _CellRowIndex,
                                            long _CellColIndex,
                                            double _NoDataValue,
                                            boolean _HandleOutOfMemoryError)
Parameters:
x - The x-coordinate of the point.
y - The y-coordinate of the point.
_CellRowIndex - The cell row index of the cell from which the distance nearest to the nearest cell value is returned.
_CellColIndex - The cell column index of the cell from which the distance nearest to the nearest cell value is returned.
_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.
Returns:
the distance to the nearest data value from: point given by x-coordinate x, y-coordinate y in position given by row index rowIndex, column index colIndex as a double.

getNearestValueDoubleDistance

protected double getNearestValueDoubleDistance(double x,
                                               double y,
                                               long _CellRowIndex,
                                               long _CellColIndex,
                                               double _NoDataValue)
Parameters:
x - The x-coordinate of the point.
y - The y-coordinate of the point.
_CellRowIndex - The cell row index of the cell from which the distance nearest to the nearest cell value is returned.
_CellColIndex - The cell column index of the cell from which the distance nearest to the nearest cell value is returned.
Returns:
the distance to the nearest data value from: point given by x-coordinate x, y-coordinate y in position given by row index rowIndex, column index colIndex as a double.

addToCell

public double addToCell(double x,
                        double y,
                        double valueToAdd,
                        boolean _HandleOutOfMemoryError)
Parameters:
x - the x-coordinate of the point
y - the y-coordinate of the point
valueToAdd - the value to be added to the cell containing the point
_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.
Returns:
current value of cell containing the point given by x-coordinate x, y-coordinate y, and adds valueToAdd to that cell.

addToCell

protected double addToCell(double x,
                           double y,
                           double valueToAdd)
Parameters:
x - the x-coordinate of the point
y - the y-coordinate of the point
valueToAdd - the value to be added to the cell containing the point
Returns:
current value of cell containing the point given by x-coordinate x, y-coordinate y, and adds valueToAdd to that cell.

addToCell

public double addToCell(AbstractGrid2DSquareCell.CellID cellID,
                        double valueToAdd,
                        boolean _HandleOutOfMemoryError)
Parameters:
cellID - the CellID of the cell.
valueToAdd - the value to be added to the cell containing the point
_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.
Returns:
Value of the cell with cell ID cellID and adds valueToAdd to that cell.

addToCell

protected double addToCell(AbstractGrid2DSquareCell.CellID cellID,
                           double valueToAdd)
Parameters:
cellID - the CellID of the cell.
valueToAdd - the value to be added to the cell containing the point
Returns:
Value of the cell with cell ID cellID and adds valueToAdd to that cell.

addToCell

public double addToCell(long _CellRowIndex,
                        long _CellColIndex,
                        double valueToAdd,
                        boolean _HandleOutOfMemoryError)
Parameters:
_CellRowIndex - the row index of the cell.
_CellColIndex - the col index of the cell.
valueToAdd - the value to be added to the cell.
_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. NB1. If cell is not contained in this then then returns _NoDataValue. NB2. Adding to _NoDataValue is done as if adding to a cell with value of 0. TODO: Check Arithmetic
Returns:
current value of cell with row index rowIndex and column index colIndex and adds valueToAdd to that cell.

addToCell

protected double addToCell(long _CellRowIndex,
                           long _CellColIndex,
                           double valueToAdd)
Parameters:
_CellRowIndex - the row index of the cell.
_CellColIndex - the col index of the cell.
valueToAdd - the value to be added to the cell. NB1. If cell is not contained in this then then returns _NoDataValue. NB2. Adding to _NoDataValue is done as if adding to a cell with value of 0. TODO: Check Arithmetic
Returns:
current value of cell with row index rowIndex and column index colIndex and adds valueToAdd to that cell.

iterator

public java.util.Iterator iterator(boolean _HandleOutOfMemoryError)
Specified by:
iterator in class AbstractGrid2DSquareCell
Parameters:
_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.
Returns:
an iterator over the cell value in this.