|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellAbstract uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble
public class Grid2DSquareCellDouble
A class for representing grids of double precision values.
Grid2DSquareCellAbstract
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellAbstract |
---|
Grid2DSquareCellAbstract.CellID, Grid2DSquareCellAbstract.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.Grid2DSquareCellAbstract |
---|
chunkNcols, chunkNrows, dimensions, dimensionsScale, directory, grid2DSquareCellChunks, gridStatistics, name, nChunkCols, nChunkRows, ncols, nrows, unsignedLongPowersOf2 |
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler |
---|
handleOutOfMemoryErrorFalse, handleOutOfMemoryErrorTrue, memoryReserve |
Constructor Summary | |
---|---|
Grid2DSquareCellDouble()
Creates a new Grid2DSquareCellDouble |
|
Grid2DSquareCellDouble(java.io.File directory,
java.io.File gridFile,
java.io.ObjectInputStream ois)
Creates a new Grid2DSquareCellDouble. |
|
Grid2DSquareCellDouble(GridStatisticsAbstract gridStatistics,
java.io.File directory,
java.io.File gridFile,
Grid2DSquareCellDoubleChunkAbstractFactory grid2DSquareCellDoubleChunkFactory,
int chunkNrows,
int chunkNcols,
long startRowIndex,
long startColIndex,
long endRowIndex,
long endColIndex,
double noDataValue)
Returns a new Grid2DSquareCellDouble with values obtained from gridFile. |
|
Grid2DSquareCellDouble(GridStatisticsAbstract gridStatistics,
java.io.File directory,
Grid2DSquareCellAbstract grid2DSquareCell,
Grid2DSquareCellDoubleChunkAbstractFactory grid2DSquareCellDoubleChunkFactory,
int chunkNrows,
int chunkNcols,
long startRowIndex,
long startColIndex,
long endRowIndex,
long endColIndex,
double noDataValue)
Creates a new Grid2DSquareCellDouble based on values in grid2DSquareCell. |
|
Grid2DSquareCellDouble(GridStatisticsAbstract gridStatistics,
java.io.File directory,
Grid2DSquareCellDoubleChunkAbstractFactory grid2DSquareCellDoubleChunkFactory,
int chunkNrows,
int chunkNcols,
long nrows,
long ncols,
java.math.BigDecimal[] dimensions,
double noDataValue)
Creates a new Grid2DSquareCellDouble with each cell value equal to noDataValue and all chunks of the same type. |
Method Summary | |
---|---|
double |
addToCell(double x,
double y,
double valueToAdd,
boolean handleOutOfMemoryError)
Returns current value of cell containing the point given by x-coordinate x, y-coordinate y, and adds valueToAdd to that cell. |
double |
addToCell(Grid2DSquareCellAbstract.CellID cellID,
double valueToAdd,
boolean handleOutOfMemoryError)
Returns the value of the cell with cell ID cellID and adds valueToAdd to that cell. |
double |
addToCell(long cellRowIndex,
long cellColIndex,
double valueToAdd,
boolean handleOutOfMemoryError)
Returns current value of cell with row index rowIndex and column index colIndex and adds valueToAdd to that cell. |
void |
clear()
TODO: Clears all resources to do with this. |
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 int. |
double |
getCell(Grid2DSquareCellAbstract.CellID cellID,
boolean handleOutOfMemoryError)
For returning the value of the cell with cell ID cellID as a int. |
double |
getCell(Grid2DSquareCellDoubleChunkAbstract grid2DSquareCellChunk,
int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex,
boolean handleOutOfMemoryError)
Returns the value at cellRowIndex, cellColIndex. |
double |
getCell(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns the value at cellRowIndex, cellColIndex else returns noDataValue. |
double[] |
getCells(double x,
double y,
double distance,
boolean handleOutOfMemoryError)
Returns a 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. |
protected double[] |
getCells(double x,
double y,
long cellRowIndex,
long cellColIndex,
double distance,
boolean handleOutOfMemoryError)
Returns a int[] of all cell values for cells thats centroids are intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance. |
double[] |
getCells(long cellRowIndex,
long cellColIndex,
double distance,
boolean handleOutOfMemoryError)
Returns a int[] 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. |
Grid2DSquareCellDoubleChunkAbstract |
getGrid2DSquareCellDoubleChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Returns grid2DSquareCellDoubleChunksAbstract for the given ChunkID |
Grid2DSquareCellDoubleChunkAbstract |
getGrid2DSquareCellDoubleChunk(int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
Returns grid2DSquareCellDoubleChunks. |
double |
getNearestValueDouble(double x,
double y,
boolean handleOutOfMemoryError)
Returns the average of the nearest data values to point given by x-coordinate x, y-coordinate y as a double. |
protected double |
getNearestValueDouble(double x,
double y,
long cellRowIndex,
long cellColIndex,
double noDataValue,
boolean handleOutOfMemoryError)
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 |
double |
getNearestValueDouble(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns the average of the nearest data values to position given by row index rowIndex, column index colIndex |
double |
getNearestValueDoubleDistance(double x,
double y,
boolean handleOutOfMemoryError)
Returns the distance to the nearest data value from point given by x-coordinate x, y-coordinate y as a double. |
protected double |
getNearestValueDoubleDistance(double x,
double y,
long cellRowIndex,
long cellColIndex,
double noDataValue,
boolean handleOutOfMemoryError)
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. |
double |
getNearestValueDoubleDistance(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns the distance to the nearest data value from position given by row index rowIndex, column index colIndex as a double. |
Grid2DSquareCellAbstract.CellID[] |
getNearestValuesCellIDs(double x,
double y,
boolean handleOutOfMemoryError)
Returns a CellID[] - The CellIDs of the nearest cells with data values to point given by x-coordinate x, y-coordinate y. |
protected Grid2DSquareCellAbstract.CellID[] |
getNearestValuesCellIDs(double x,
double y,
long cellRowIndex,
long cellColIndex,
double noDataValue,
boolean handleOutOfMemoryError)
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. |
Grid2DSquareCellAbstract.CellID[] |
getNearestValuesCellIDs(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns a CellID[] - The CellIDs of the nearest cells with data values to position given by row index rowIndex, column index colIndex. |
double |
getNoDataValue()
Returns noDataValue. |
java.math.BigDecimal |
getNoDataValueBigDecimal(boolean handleOutOfMemoryError)
Returns the noDataValue of this as a BigDecimal. |
protected void |
initAll(Grid2DSquareCellAbstract grid2DSquareCell)
Initialises all fields from an existing instance. |
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,
boolean handleOutOfMemoryError)
Initilises the value at cellRowIndex, cellColIndex and does nothing about this.gridStatistics |
protected void |
initNoDataValue(double noDataValue)
Initialises noDataValue. |
java.util.Iterator |
iterator(boolean handleOutOfMemoryError)
Returns an iterator over the cell value in this. |
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. |
double |
setCell(Grid2DSquareCellAbstract.CellID cellID,
double newValue,
boolean handleOutOfMemoryError)
For returning the value of the cell with cell ID cellID and setting it to newValue. |
double |
setCell(Grid2DSquareCellDoubleChunkAbstract grid2DSquareCellChunk,
int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex,
double newValue,
boolean handleOutOfMemoryError)
Returns the value at cellRowIndex, cellColIndex and sets 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. |
double |
setCell(long cellRowIndex,
long cellColIndex,
double newValue,
boolean handleOutOfMemoryError)
For returning the value at cellRowIndex, cellColIndex and setting it to newValue. |
java.lang.String |
toString(boolean handleOutOfMemoryError)
Returns a string description of the instance. |
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler |
---|
clearMemoryReserve, initMemoryReserve, initMemoryReserve |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double noDataValue
Constructor Detail |
---|
public Grid2DSquareCellDouble()
public Grid2DSquareCellDouble(java.io.File directory, java.io.File gridFile, java.io.ObjectInputStream ois)
directory
- the File directory to be used for caching information
and data about thisgridFile
- the File that ois was constructed fromois
- the ObjectInputStream used in first attempt to construct thispublic Grid2DSquareCellDouble(GridStatisticsAbstract gridStatistics, java.io.File directory, Grid2DSquareCellDoubleChunkAbstractFactory grid2DSquareCellDoubleChunkFactory, int chunkNrows, int chunkNcols, long nrows, long ncols, java.math.BigDecimal[] dimensions, double noDataValue)
gridStatistics
- The GridStatisticsAbstract to accompany the
returned grid.directory
- The directory to be used for storing cached
Grid2DSquareCellDouble information.grid2DSquareCellDoubleChunkFactory
- The
Grid2DSquareCellDoubleChunkAbstractFactory 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.
java.lang.OutOfMemoryError
- if unable to load a chunk constructed.
TODO: make protected and move to a factory class.public Grid2DSquareCellDouble(GridStatisticsAbstract gridStatistics, java.io.File directory, Grid2DSquareCellAbstract grid2DSquareCell, Grid2DSquareCellDoubleChunkAbstractFactory grid2DSquareCellDoubleChunkFactory, int chunkNrows, int chunkNcols, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, double noDataValue)
gridStatistics
- The GridStatisticsAbstract to accompany the
returned grid.directory
- The directory to be used for storing cached
Grid2DSquareCellDouble information.grid2DSquareCell
- The Grid2DSquareCellAbstract from which this is
to be constructed.grid2DSquareCellDoubleChunkFactory
- The
Grid2DSquareCellDoubleChunkAbstractFactory 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.public Grid2DSquareCellDouble(GridStatisticsAbstract gridStatistics, java.io.File directory, java.io.File gridFile, Grid2DSquareCellDoubleChunkAbstractFactory grid2DSquareCellDoubleChunkFactory, int chunkNrows, int chunkNcols, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, double noDataValue)
gridStatistics
- The GridStatisticsAbstract 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
Grid2DSquareCellDoubleChunkAbstractFactory prefered to construct chunks
of this.chunkNrows
- The Grid2DSquareCellDouble chunkNrows.chunkNcols
- The Grid2DSquareCellDouble chunkNcols.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.noDataValue
- The noDataValue for this.Method Detail |
---|
public java.lang.String toString(boolean handleOutOfMemoryError)
toString
in class Grid2DSquareCellAbstract
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.protected void initAll(Grid2DSquareCellAbstract grid2DSquareCell)
initAll
in class Grid2DSquareCellAbstract
grid2DSquareCell
- the Grid2DSquareCellAbstract from which
the field values of this are set.public Grid2DSquareCellDoubleChunkAbstract getGrid2DSquareCellDoubleChunk(int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public Grid2DSquareCellDoubleChunkAbstract getGrid2DSquareCellDoubleChunk(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public void clear()
public final double getNoDataValue()
public java.math.BigDecimal getNoDataValueBigDecimal(boolean handleOutOfMemoryError)
getNoDataValueBigDecimal
in class Grid2DSquareCellAbstract
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.
TODO:
Handling for Infinite values.protected final void initNoDataValue(double noDataValue)
noDataValue
- The value this.noDataValue is initialised to.public double getCell(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
cellRowIndex
- .cellColIndex
- .handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double getCell(Grid2DSquareCellDoubleChunkAbstract grid2DSquareCellChunk, int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- .chunkColIndex
- .chunkCellRowIndex
- .chunkCellColIndex
- .handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public final double getCell(double x, double y, boolean handleOutOfMemoryError)
x
- the x-coordinate of the point.y
- the y-coordinate of the point.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public final double getCell(Grid2DSquareCellAbstract.CellID cellID, boolean handleOutOfMemoryError)
cellID
- the CellID of the cell.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public final double setCell(double x, double y, double newValue, boolean handleOutOfMemoryError)
x
- the x-coordinate of the point.y
- the y-coordinate of the point.newValue
- .handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public final double setCell(Grid2DSquareCellAbstract.CellID cellID, double newValue, boolean handleOutOfMemoryError)
cellID
- the CellID of the cell.newValue
- .handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double setCell(long cellRowIndex, long cellColIndex, double newValue, boolean handleOutOfMemoryError)
cellRowIndex
- .cellColIndex
- .newValue
- .handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double setCell(int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, double newValue, boolean handleOutOfMemoryError)
chunkRowIndex
- chunkColIndex
- chunkCellRowIndex
- chunkCellColIndex
- newValue
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double setCell(Grid2DSquareCellDoubleChunkAbstract grid2DSquareCellChunk, int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, double newValue, boolean handleOutOfMemoryError)
chunkRowIndex
- .chunkColIndex
- .newValue
- .handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.protected void initCell(long cellRowIndex, long cellColIndex, double valueToInitialise, boolean handleOutOfMemoryError)
cellRowIndex
- cellColIndex
- valueToInitialise
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.protected void initCellFast(long cellRowIndex, long cellColIndex, double valueToInitialise, boolean handleOutOfMemoryError)
cellRowIndex
- cellColIndex
- valueToInitialise
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double[] getCells(double x, double y, double distance, boolean handleOutOfMemoryError)
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
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double[] getCells(long cellRowIndex, long cellColIndex, double distance, boolean handleOutOfMemoryError)
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
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.protected double[] getCells(double x, double y, long cellRowIndex, long cellColIndex, double distance, boolean handleOutOfMemoryError)
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
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double getNearestValueDouble(double x, double y, boolean handleOutOfMemoryError)
x
- the x-coordinate of the pointy
- the y-coordinate of the pointhandleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double getNearestValueDouble(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
cellRowIndex
- the row index from which average of the nearest data
values is returnedcellColIndex
- the column index from which average of the nearest data
values is returnedhandleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.protected double getNearestValueDouble(double x, double y, long cellRowIndex, long cellColIndex, double noDataValue, boolean handleOutOfMemoryError)
x
- the x-coordinate of the pointy
- the y-coordinate of the pointcellRowIndex
- the row index from which average of the nearest data
values is returnedcellColIndex
- the column index from which average of the nearest data
values is returnedhandleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public Grid2DSquareCellAbstract.CellID[] getNearestValuesCellIDs(double x, double y, boolean handleOutOfMemoryError)
x
- The x-coordinate of the point.y
- The y-coordinate of the point.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public Grid2DSquareCellAbstract.CellID[] getNearestValuesCellIDs(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
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
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.protected Grid2DSquareCellAbstract.CellID[] getNearestValuesCellIDs(double x, double y, long cellRowIndex, long cellColIndex, double noDataValue, boolean handleOutOfMemoryError)
x
- the x-coordinate of the pointy
- the y-coordinate of the pointcellRowIndex
- 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 gridhandleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double getNearestValueDoubleDistance(double x, double y, boolean handleOutOfMemoryError)
x
- The x-coordinate of the point.y
- The y-coordinate of the point.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double getNearestValueDoubleDistance(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
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
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.protected double getNearestValueDoubleDistance(double x, double y, long cellRowIndex, long cellColIndex, double noDataValue, boolean handleOutOfMemoryError)
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
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double addToCell(double x, double y, double valueToAdd, boolean handleOutOfMemoryError)
x
- the x-coordinate of the pointy
- the y-coordinate of the pointvalueToAdd
- the value to be added to the cell containing the pointhandleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double addToCell(Grid2DSquareCellAbstract.CellID cellID, double valueToAdd, boolean handleOutOfMemoryError)
cellID
- the CellID of the cell.valueToAdd
- the value to be added to the cell containing the pointhandleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.public double addToCell(long cellRowIndex, long cellColIndex, double valueToAdd, boolean handleOutOfMemoryError)
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
in this method then caching operations are initiated prior to retrying.
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 Arithmeticpublic java.util.Iterator iterator(boolean handleOutOfMemoryError)
iterator
in class Grid2DSquareCellAbstract
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught
in this method then caching operations are initiated prior to retrying.
If false then OutOfMemoryErrors are caught and thrown.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |