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

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellFactory
      extended by uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleFactory

public class Grid2DSquareCellDoubleFactory
extends AbstractGrid2DSquareCellFactory

A factory for constructing Grid2DSquareCellDouble instances.


Field Summary
protected  AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory
          The Grid2DSquareCellChunkAbstractFactory for creating chunks.
protected  double _NoDataValue
          The _NoDataValue for creating chunks.
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellFactory
_ChunkNCols, _ChunkNRows, _Dimensions, _Directory, _Grids_Environment, _HandleOutOfMemoryError
 
Constructor Summary
Grid2DSquareCellDoubleFactory(double _NoDataValue, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Creates a new Grid2DSquareCellDoubleFactory.
Grid2DSquareCellDoubleFactory(java.io.File _Directory, double _NoDataValue, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Creates a new Grid2DSquareCellDoubleFactory.
Grid2DSquareCellDoubleFactory(java.io.File _Directory, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Creates a new Grid2DSquareCellDoubleFactory.
Grid2DSquareCellDoubleFactory(java.io.File _Directory, int _ChunkNRows, int _ChunkNCols, AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory, double _NoDataValue, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Creates a new Grid2DSquareCellDoubleFactory.
Grid2DSquareCellDoubleFactory(java.io.File _Directory, int _ChunkNRows, int _ChunkNCols, AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Creates a new Grid2DSquareCellDoubleFactory.
Grid2DSquareCellDoubleFactory(Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Creates a new Grid2DSquareCellDoubleFactory.
 
Method Summary
 Grid2DSquareCellDouble create(AbstractGridStatistics _GridStatistics, java.io.File _Directory, AbstractGrid2DSquareCell _Grid2DSquareCell, AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Returns a new Grid2DSquareCellDouble with all values taken from _Grid2DSquareCell.
 Grid2DSquareCellDouble create(AbstractGridStatistics _GridStatistics, java.io.File _Directory, AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory, long _NRows, long _NCols, java.math.BigDecimal[] _Dimensions, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Returns a new Grid2DSquareCellDouble grid with all values as NoDataValues.
 Grid2DSquareCellDouble create(AbstractGridStatistics _GridStatistics, java.io.File _Directory, java.io.File gridFile, AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Returns a new Grid2DSquareCellDouble with values obtained from gridFile.
 Grid2DSquareCellDouble create(java.io.File _Directory, AbstractGrid2DSquareCell _Grid2DSquareCell, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Returns a new Grid2DSquareCellDouble with all values taken from _Grid2DSquareCell.
 Grid2DSquareCellDouble create(java.io.File _Directory, java.io.File gridFile, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Returns a new Grid2DSquareCellDouble with values obtained from gridFile.
 Grid2DSquareCellDouble create(java.io.File _Directory, java.io.File gridFile, java.io.ObjectInputStream ois, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Returns a new Grid2DSquareCellDouble with values obtained from gridFile.
 Grid2DSquareCellDouble create(java.io.File _Directory, long _NRows, long _NCols, java.math.BigDecimal[] _Dimensions, Grids_Environment a_Grids_Environment, boolean handleOutOfMemoryError)
          Returns a new Grid2DSquareCellDouble grid with all values as NoDataValues.
 double get_NoDataValue()
          Returns this._NoDataValue.
 AbstractGrid2DSquareCellDoubleChunkFactory getGrid2DSquareCellDoubleChunkFactory()
          Returns a reference to this._Grid2DSquareCellDoubleChunkFactory.
 void set_NoDataValue(double noDataValue)
          Sets this._NoDataValue.
 void setGrid2DSquareCellDoubleChunkFactory(AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory)
          Sets this._Grid2DSquareCellDoubleChunkFactory to _Grid2DSquareCellDoubleChunkFactory.
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellFactory
create, create, create, create, create, create, create, create, create, create, create, get_ChunkNCols, get_ChunkNRows, get_Dimensions, get_Directory, get_Directory, get_GridStatistics, gethandleOutOfMemoryError, set_ChunkNCols, set_ChunkNRows, set_Dimensions, set_Directory, set_GridStatistics, sethandleOutOfMemoryError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_Grid2DSquareCellDoubleChunkFactory

protected AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory
The Grid2DSquareCellChunkAbstractFactory for creating chunks.


_NoDataValue

protected double _NoDataValue
The _NoDataValue for creating chunks.

Constructor Detail

Grid2DSquareCellDoubleFactory

public Grid2DSquareCellDoubleFactory(Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Creates a new Grid2DSquareCellDoubleFactory. Default: _NoDataValue to Double.NEGATIVE_INFINITY


Grid2DSquareCellDoubleFactory

public Grid2DSquareCellDoubleFactory(double _NoDataValue,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Creates a new Grid2DSquareCellDoubleFactory.

Parameters:
_NoDataValue - The _NoDataValue initially set for construction. Defaults: _Directory to a new one in System.getProperties( "java.io.tmpdir" );

Grid2DSquareCellDoubleFactory

public Grid2DSquareCellDoubleFactory(java.io.File _Directory,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Creates a new Grid2DSquareCellDoubleFactory.

Parameters:
_Directory - A "workspace _Directory" for storing temporary files and swapping Grid2DSquareCellDouble data to. Defaults: _ChunkNRows to 64 _ChunkNColss to 64 AbstractGrid2DSquareCellDoubleChunkFactory to _Grid2DSquareCellDoubleChunkArray

Grid2DSquareCellDoubleFactory

public Grid2DSquareCellDoubleFactory(java.io.File _Directory,
                                     double _NoDataValue,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Creates a new Grid2DSquareCellDoubleFactory.

Parameters:
_Directory - A "workspace _Directory" for storing temporary files and swapping Grid2DSquareCellDouble data to.
_NoDataValue - The _NoDataValue initially set for construction. Default: _ChunkNRows to 64; _ChunkNColss to 64; AbstractGrid2DSquareCellDoubleChunkFactory to _Grid2DSquareCellDoubleChunkArray.

Grid2DSquareCellDoubleFactory

public Grid2DSquareCellDoubleFactory(java.io.File _Directory,
                                     int _ChunkNRows,
                                     int _ChunkNCols,
                                     AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Creates a new Grid2DSquareCellDoubleFactory.

Parameters:
_Directory - A "workspace _Directory" for storing temporary files and caching Grid2DSquareCellDoubleAbstract data.
_ChunkNRows - The number of rows chunks have by default.
_Grid2DSquareCellDoubleChunkFactory - TheGrid2DSquareCellDoubleChunkFactoryy for creating Grid2DSquareCellDoubleChunks Default: _NoDataValue to Double.NEGATIVE_INFINITY.
_ChunkNCols - The number of columns chunks have by default.

Grid2DSquareCellDoubleFactory

public Grid2DSquareCellDoubleFactory(java.io.File _Directory,
                                     int _ChunkNRows,
                                     int _ChunkNCols,
                                     AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory,
                                     double _NoDataValue,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Creates a new Grid2DSquareCellDoubleFactory.

Parameters:
_Directory - A "workspace _Directory" for storing temporary files and caching Grid2DSquareCellDoubleAbstract data.
_ChunkNRows - The number of rows chunks have by default.
_Grid2DSquareCellDoubleChunkFactory - TheGrid2DSquareCellDoubleChunkFactoryy for creating Grid2DSquareCellDoubleChunks
_NoDataValue - The _NoDataValue initially set for construction.
_ChunkNCols - The number of columns chunks have by default.
Method Detail

getGrid2DSquareCellDoubleChunkFactory

public AbstractGrid2DSquareCellDoubleChunkFactory getGrid2DSquareCellDoubleChunkFactory()
Returns a reference to this._Grid2DSquareCellDoubleChunkFactory.


setGrid2DSquareCellDoubleChunkFactory

public void setGrid2DSquareCellDoubleChunkFactory(AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory)
Sets this._Grid2DSquareCellDoubleChunkFactory to _Grid2DSquareCellDoubleChunkFactory.


get_NoDataValue

public double get_NoDataValue()
Returns this._NoDataValue.


set_NoDataValue

public void set_NoDataValue(double noDataValue)
Sets this._NoDataValue.


create

public Grid2DSquareCellDouble create(java.io.File _Directory,
                                     long _NRows,
                                     long _NCols,
                                     java.math.BigDecimal[] _Dimensions,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Returns a new Grid2DSquareCellDouble grid with all values as NoDataValues.

Specified by:
create in class AbstractGrid2DSquareCellFactory
Parameters:
_Directory - The _Directory to be used for storing cached Grid2DSquareCellDouble information.
_NRows - The Grid2DSquareCellDouble _NRows.
_NCols - The Grid2DSquareCellDouble _NCols.
_Dimensions -
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappableGrid2DSquareCellt 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.
Returns:
AbstractGrid2DSquareCell grid with all values as _NoDataValues.

create

public Grid2DSquareCellDouble create(AbstractGridStatistics _GridStatistics,
                                     java.io.File _Directory,
                                     AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory,
                                     long _NRows,
                                     long _NCols,
                                     java.math.BigDecimal[] _Dimensions,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Returns a new Grid2DSquareCellDouble grid with all values as NoDataValues.

Parameters:
_GridStatistics - The AbstractGridStatistics to accompany the returned grid.
_Directory - The _Directory to be used for storing cached Grid2DSquareCellDouble information.
_Grid2DSquareCellDoubleChunkFactory - The prefered Grid2DSquareCellDoubleChunkFactoryy for creating chunks that the constructed Grid2DSquareCellDouble is to be made of.
_NRows - The Grid2DSquareCellDouble _NRows.
_NCols - The Grid2DSquareCellDouble _NCols.
_Dimensions -
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappableGrid2DSquareCellt instances.
handleOutOfMemoryError - If true then OutOfMemoryErrors are caught in this method then swap operations are initiated prior to retrying. If false then OutOfMemoryErrors are caught and thrown.

create

public Grid2DSquareCellDouble create(java.io.File _Directory,
                                     AbstractGrid2DSquareCell _Grid2DSquareCell,
                                     long startRowIndex,
                                     long startColIndex,
                                     long endRowIndex,
                                     long endColIndex,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Returns a new Grid2DSquareCellDouble with all values taken from _Grid2DSquareCell.

Specified by:
create in class AbstractGrid2DSquareCellFactory
Parameters:
_Directory - The _Directory to be used for storing cached Grid2DSquareCellDouble information.
_Grid2DSquareCell - TheGrid2DSquareCellt from which grid values are used.
startRowIndex - The topmost row index of _Grid2DSquareCell.
startColIndex - The leftmost column index of _Grid2DSquareCell.
endRowIndex - The bottom row index of _Grid2DSquareCell.
endColIndex - The rightmost column index of _Grid2DSquareCell.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappable Objects of Grid2DSquareCellt type. Default: Grid2DSquareCellDoubleChunkFactoryy to this._Grid2DSquareCellDoubleChunkFactory AbstractGridStatistics to GridStatistics1
Returns:
AbstractGrid2DSquareCell with values obtained from grid2DSquareCell.

create

public Grid2DSquareCellDouble create(AbstractGridStatistics _GridStatistics,
                                     java.io.File _Directory,
                                     AbstractGrid2DSquareCell _Grid2DSquareCell,
                                     AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory,
                                     long startRowIndex,
                                     long startColIndex,
                                     long endRowIndex,
                                     long endColIndex,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Returns a new Grid2DSquareCellDouble with all values taken from _Grid2DSquareCell.

Parameters:
_GridStatistics - The AbstractGridStatistics to accompany the returned grid.
_Directory - The _Directory to be used for storing cached Grid2DSquareCellDouble information.
_Grid2DSquareCellDoubleChunkFactory - The prefered Grid2DSquareCellDoubleChunkFactoryy for creating chunks that the constructed Grid2DSquareCellDouble is to be made of.
_Grid2DSquareCell - TheGrid2DSquareCellt from which grid values are used.
startRowIndex - The topmost row index of _Grid2DSquareCell.
startColIndex - The leftmost column index of _Grid2DSquareCell.
endRowIndex - The bottom row index of _Grid2DSquareCell.
endColIndex - The rightmost column index of _Grid2DSquareCell.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappableGrid2DSquareCellt 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.

create

public Grid2DSquareCellDouble create(java.io.File _Directory,
                                     java.io.File gridFile,
                                     long startRowIndex,
                                     long startColIndex,
                                     long endRowIndex,
                                     long endColIndex,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Returns a new Grid2DSquareCellDouble with values obtained from gridFile.

Specified by:
create in class AbstractGrid2DSquareCellFactory
Parameters:
_Directory - The _Directory to be used for storing cached Grid2DSquareCellDouble information.
gridFile - Either a _Directory, or a formatted File with a specific extension containing the data and information about the Grid2DSquareCellDouble to be returned.
startRowIndex - The topmost row index of the grid stored as gridFile.
startColIndex - The leftmost column index of the grid stored as gridFile.
endRowIndex - The bottom row index of the grid stored as gridFile.
endColIndex - The rightmost column index of the grid stored as gridFile.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappable Objects of Grid2DSquareCellt type.
Returns:
AbstractGrid2DSquareCell with values obtained from gridFile.

create

public Grid2DSquareCellDouble create(AbstractGridStatistics _GridStatistics,
                                     java.io.File _Directory,
                                     java.io.File gridFile,
                                     AbstractGrid2DSquareCellDoubleChunkFactory _Grid2DSquareCellDoubleChunkFactory,
                                     long startRowIndex,
                                     long startColIndex,
                                     long endRowIndex,
                                     long endColIndex,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Returns a new Grid2DSquareCellDouble with values obtained from gridFile.

Parameters:
_GridStatistics - The AbstractGridStatistics to accompany the returned grid.
_Directory - The _Directory to be used for storing cached Grid2DSquareCellDouble information.
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 prefered Grid2DSquareCellDoubleChunkFactoryy for creating chunks that the constructed Grid2DSquareCellDouble is to be made of.
startRowIndex - The topmost row index of the grid stored as gridFile.
startColIndex - The leftmost column index of the grid stored as gridFile.
endRowIndex - The bottom row index of the grid stored as gridFile.
endColIndex - The rightmost column index of the grid stored as gridFile.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappableGrid2DSquareCellt instances.
handleOutOfMemoryError - If true then OutOfMemoryErrors are caught in this method then swap operations are initiated prior to retrying. If false then OutOfMemoryErrors are caught and thrown.

create

public Grid2DSquareCellDouble create(java.io.File _Directory,
                                     java.io.File gridFile,
                                     java.io.ObjectInputStream ois,
                                     Grids_Environment a_Grids_Environment,
                                     boolean handleOutOfMemoryError)
Returns a new Grid2DSquareCellDouble with values obtained from gridFile.

Specified by:
create in class AbstractGrid2DSquareCellFactory
Parameters:
_Directory - The _Directory for swapping to file.
gridFile - A file containing the data to be used in construction.
ois - The ObjectInputStream to construct from.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappable Objects of Grid2DSquareCellt type.
Returns:
AbstractGrid2DSquareCell with values obtained from gridFile.