public class TLcdRasterMatrix extends Object implementsILcdMatrix, ILcdMatrixView
A TLcdRasterMatrix
is an ILcdMatrix
wrapper around a part of an
ILcdRaster
. This implementation assumes that the bounds and all rasters have
the same model reference.
The implementation of the ILcdMatrix
interface is for backward compatibility.
Constructor and Description |
---|
TLcdRasterMatrix(ILcdRaster[] aRasters,
ILcdBounds aBounds,
int aXLength,
int aYLength)
Construct a new raster matrix for the specified rasters.
|
TLcdRasterMatrix(ILcdRaster aRaster,
ILcdBounds aBounds,
int aXLength,
int aYLength)
Construct a new raster matrix for the specified raster.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount()
Returns the number of columns in this matrix view.
|
double |
getDefaultValue()
Returns the default value.
|
int |
getHeight()
Deprecated.
Use
getRowCount() . |
int |
getRowCount()
Returns the number of rows in this matrix view.
|
double |
getValue(int i,
int j)
Returns the value of the matrix at point (i,j).
|
int |
getWidth()
Deprecated.
Use
getColumnCount() . |
double |
getX(int i,
int j)
Deprecated.
|
double |
getY(int i,
int j)
Deprecated.
|
double |
retrieveAssociatedPointX(int i,
int j)
Returns the x-coordinate of the associated point corresponding to the column
index
aColumnIndex and the row index aRowIndex . |
double |
retrieveAssociatedPointY(int i,
int j)
Returns the y-coordinate of the associated point corresponding to the column
index
aColumnIndex and the row index aRowIndex . |
void |
setDefaultValue(double aDefaultValue)
Sets the value that needs to be returned in case no raster
is found at the specified location.
|
public TLcdRasterMatrix(ILcdRaster aRaster, ILcdBounds aBounds, int aXLength, int aYLength)
aRaster
- The raster to be used.aBounds
- The bounds of the raster.aXLength
- The column count.aYLength
- The row count.public TLcdRasterMatrix(ILcdRaster[] aRasters, ILcdBounds aBounds, int aXLength, int aYLength)
aRasters
- The array of rasters to be used.aBounds
- The bounds of the rasters.aXLength
- The column count.aYLength
- The row count.public void setDefaultValue(double aDefaultValue)
aDefaultValue
- The default value.public double getDefaultValue()
setDefaultValue(double)
public double getValue(int i, int j)
ILcdMatrix
getValue
in interface ILcdMatrixView
getValue
in interface ILcdMatrix
i
- The first index of the matrix point.j
- The second index of the matrix point.public double retrieveAssociatedPointX(int i, int j)
ILcdMatrixView
aColumnIndex
and the row index aRowIndex
.retrieveAssociatedPointX
in interface ILcdMatrixView
i
- the column index, positive and smaller than the columncount.j
- the row index, positive and smaller than the rowcount.public double retrieveAssociatedPointY(int i, int j)
ILcdMatrixView
aColumnIndex
and the row index aRowIndex
.retrieveAssociatedPointY
in interface ILcdMatrixView
i
- the column index, positive and smaller than the columncount.j
- the row index, positive and smaller than the rowcount.public int getRowCount()
ILcdMatrixView
getRowCount
in interface ILcdMatrixView
public int getColumnCount()
ILcdMatrixView
getColumnCount
in interface ILcdMatrixView
public double getX(int i, int j)
retrieveAssociatedPointX( int, int )
.ILcdMatrix
getX
in interface ILcdMatrix
i
- The first index of the matrix point.j
- The second index of the matrix point.public double getY(int i, int j)
retrieveAssociatedPointY( int, int )
.ILcdMatrix
getY
in interface ILcdMatrix
i
- The first index of the matrix point.j
- The second index of the matrix point.public int getWidth()
getColumnCount()
.ILcdMatrix
getWidth
in interface ILcdMatrix
public int getHeight()
getRowCount()
.ILcdMatrix
getHeight
in interface ILcdMatrix