Package com.luciad.tea
Class TLcdRasterMatrix
java.lang.Object
com.luciad.tea.TLcdRasterMatrix
- All Implemented Interfaces:
ILcdMatrixView
,ILcdMatrix
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 Summary
ConstructorDescriptionTLcdRasterMatrix
(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. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of columns in this matrix view.double
Returns the default value.int
Deprecated.int
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.UsegetColumnCount()
.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 indexaColumnIndex
and the row indexaRowIndex
.double
retrieveAssociatedPointY
(int i, int j) Returns the y-coordinate of the associated point corresponding to the column indexaColumnIndex
and the row indexaRowIndex
.void
setDefaultValue
(double aDefaultValue) Sets the value that needs to be returned in case no raster is found at the specified location.
-
Constructor Details
-
TLcdRasterMatrix
Construct a new raster matrix for the specified raster. The bounds argument is used to find the associated points of the matrix view.- Parameters:
aRaster
- The raster to be used.aBounds
- The bounds of the raster.aXLength
- The column count.aYLength
- The row count.
-
TLcdRasterMatrix
Construct a new raster matrix for the specified rasters. The bounds argument is used to find the associated points of the matrix view.- Parameters:
aRasters
- The array of rasters to be used.aBounds
- The bounds of the rasters.aXLength
- The column count.aYLength
- The row count.
-
-
Method Details
-
setDefaultValue
public void setDefaultValue(double aDefaultValue) Sets the value that needs to be returned in case no raster is found at the specified location.- Parameters:
aDefaultValue
- The default value.
-
getDefaultValue
public double getDefaultValue()Returns the default value.- Returns:
- the default value.
- See Also:
-
getValue
public double getValue(int i, int j) Description copied from interface:ILcdMatrix
Returns the value of the matrix at point (i,j).- Specified by:
getValue
in interfaceILcdMatrix
- Specified by:
getValue
in interfaceILcdMatrixView
- Parameters:
i
- The first index of the matrix point.j
- The second index of the matrix point.- Returns:
- The value of the matrix at point (i,j).
-
retrieveAssociatedPointX
public double retrieveAssociatedPointX(int i, int j) Description copied from interface:ILcdMatrixView
Returns the x-coordinate of the associated point corresponding to the column indexaColumnIndex
and the row indexaRowIndex
.- Specified by:
retrieveAssociatedPointX
in interfaceILcdMatrixView
- Parameters:
i
- the column index, positive and smaller than the columncount.j
- the row index, positive and smaller than the rowcount.- Returns:
- the x-coordinate of the associated point.
-
retrieveAssociatedPointY
public double retrieveAssociatedPointY(int i, int j) Description copied from interface:ILcdMatrixView
Returns the y-coordinate of the associated point corresponding to the column indexaColumnIndex
and the row indexaRowIndex
.- Specified by:
retrieveAssociatedPointY
in interfaceILcdMatrixView
- Parameters:
i
- the column index, positive and smaller than the columncount.j
- the row index, positive and smaller than the rowcount.- Returns:
- the y-coordinate of the associated point.
-
getRowCount
public int getRowCount()Description copied from interface:ILcdMatrixView
Returns the number of rows in this matrix view. The number of rows shall be strictly positive.- Specified by:
getRowCount
in interfaceILcdMatrixView
- Returns:
- the number of rows in this matrix view, strictly positive.
-
getColumnCount
public int getColumnCount()Description copied from interface:ILcdMatrixView
Returns the number of columns in this matrix view. The number of columns shall be strictly positive.- Specified by:
getColumnCount
in interfaceILcdMatrixView
- Returns:
- the number of columns in this matrix view, strictly positive.
-
getX
public double getX(int i, int j) Deprecated.Description copied from interface:ILcdMatrix
Returns the "true" x-coordinate at point (i,j).- Specified by:
getX
in interfaceILcdMatrix
- Parameters:
i
- The first index of the matrix point.j
- The second index of the matrix point.- Returns:
- The "true" x-coordinate at point (i,j).
-
getY
public double getY(int i, int j) Deprecated.Description copied from interface:ILcdMatrix
Returns the "true" y-coordinate at point (i,j).- Specified by:
getY
in interfaceILcdMatrix
- Parameters:
i
- The first index of the matrix point.j
- The second index of the matrix point.- Returns:
- The "true" y-coordinate at point (i,j).
-
getWidth
public int getWidth()Deprecated.UsegetColumnCount()
.Description copied from interface:ILcdMatrix
Returns the integer width of the matrix.- Specified by:
getWidth
in interfaceILcdMatrix
- Returns:
- The integer width of the matrix.
-
getHeight
public int getHeight()Deprecated.UsegetRowCount()
.Description copied from interface:ILcdMatrix
Returns the integer height of the matrix.- Specified by:
getHeight
in interfaceILcdMatrix
- Returns:
- The integer height of the matrix.
-
getRowCount()
.