|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRasterLayer
This is the base interface that all raster object have to implement
to be able to be used by SEXTANTE algorithms.
Instead of implementing this class directly, it is recommended to
extend AbstractRasterLayer
, since it solves some
of the most complex methods, such as grid window definition and resampling
methods
Field Summary | |
---|---|
static int |
INTERPOLATION_BicubicSpline
|
static int |
INTERPOLATION_Bilinear
|
static int |
INTERPOLATION_BSpline
|
static int |
INTERPOLATION_InverseDistance
|
static int |
INTERPOLATION_NearestNeighbour
|
static int |
RASTER_DATA_TYPE_BYTE
|
static int |
RASTER_DATA_TYPE_DOUBLE
|
static int |
RASTER_DATA_TYPE_FLOAT
|
static int |
RASTER_DATA_TYPE_INT
|
static int |
RASTER_DATA_TYPE_SHORT
|
Method Summary | |
---|---|
void |
add(IRasterLayer layer)
adds the value of another raster layer to this one. |
void |
addToCellValue(int x,
int y,
double dValue)
Adds a value to the current value of a cell in the first band of the layer in the first band of the layer |
void |
addToCellValue(int x,
int y,
int iBand,
double dValue)
Adds a value to the current value of a cell |
void |
assign(double dValue)
|
void |
assign(IRasterLayer layer)
|
void |
assignNoData()
|
void |
fitToGridExtent(GridExtent gridExtent)
Resamples the layer so the new full extent is the same as a given gridExtent. |
int[] |
getAccumulatedHistogram()
|
double |
getAspect(int i,
int j)
|
int |
getBandsCount()
Returns the number of bands of the layer |
byte |
getCellValueAsByte(int x,
int y)
|
byte |
getCellValueAsByte(int x,
int y,
int iBand)
|
double |
getCellValueAsDouble(int x,
int y)
|
double |
getCellValueAsDouble(int x,
int y,
int iBand)
|
float |
getCellValueAsFloat(int x,
int y)
|
float |
getCellValueAsFloat(int x,
int y,
int iBand)
|
int |
getCellValueAsInt(int x,
int y)
|
int |
getCellValueAsInt(int x,
int y,
int iBand)
|
short |
getCellValueAsShort(int x,
int y)
|
short |
getCellValueAsShort(int x,
int y,
int iBand)
|
double |
getCellValueInLayerCoords(int x,
int y,
int band)
Returns the value of a cell in the original image coords, that is, not using the query window |
int |
getDataType()
Returns the data type of the layer |
int |
getDirToNextDownslopeCell(int x,
int y)
|
int |
getDirToNextDownslopeCell(int x,
int y,
boolean b)
|
double |
getDistToNeighborInDir(int i)
|
int[] |
getHistogram()
Returns the histogram of the first band of this layer |
int[] |
getHistogram(int iBand)
Returns a histogram of a given band of this layer |
double |
getLayerCellSize()
Return the original cellsize of the layer. |
GridExtent |
getLayerGridExtent()
Returns the grid extent of the layer |
double |
getMaxValue()
Returns the max value in the first band of the layer |
double |
getMaxValue(int iBand)
Returns the max value in the given band of the layer |
double |
getMeanValue()
Returns the mean value in the first band of the layer |
double |
getMeanValue(int iBand)
Returns the mean value in the given band of the layer |
double |
getMinValue()
Returns the min value in the first band of the layer |
double |
getMinValue(int iBand)
Returns the min value in the given band of the layer |
double |
getNoDataValue()
Gets the no-data value of the layer |
int |
getNX()
Returns the number of columns in the query window of this layer |
int |
getNY()
Returns the number of rows in the query window of this layer |
double |
getSlope(int x,
int y)
|
double |
getValueAt(double x,
double y)
Returns the value of the first band of this layer, at a given world coordinate. |
double |
getValueAt(double x,
double y,
int iBand)
Returns the value at a given world coordinate. |
double |
getVariance()
Returns the variance in the first band of the layer |
double |
getVariance(int iBand)
Returns the variance in the given band of the layer |
double |
getWindowCellSize()
Return the cellsize of the query window. |
GridExtent |
getWindowGridExtent()
Returns the grid extent of the query window of this layer. |
boolean |
isInWindow(int x,
int y)
|
boolean |
isNoDataValue(double dNoDataValue)
Checks if the given value equals the no-data value of the layer |
void |
multiply(double d)
Multiplies all the values of a layer by a fixed value |
void |
setCellValue(int x,
int y,
double dValue)
Sets the value at a cell, in the first band of the layer |
void |
setCellValue(int x,
int y,
int iBand,
double dValue)
Sets the value at a cell |
void |
setFullExtent()
Sets the query window extent to the full extent of the layer |
void |
setInterpolationMethod(int iMethod)
Sets the interpolation method to use for calculating value in points other than cell centers |
void |
setNoData(int x,
int y)
Set the value of a cell in the first band of a layer to the no-data value |
void |
setNoData(int x,
int y,
int iBand)
Set the value of a cell to the no-data value |
void |
setNoDataValue(double dNoDataValue)
Sets the no-data value of the layer |
void |
setWindowExtent(GridExtent gridExtent)
Sets a new query window extent |
void |
setWindowExtent(IRasterLayer layer)
Sets the extent of the query window using the full extent of another layer |
Methods inherited from interface es.unex.sextante.dataObjects.ILayer |
---|
getCRS, getFullExtent |
Methods inherited from interface es.unex.sextante.dataObjects.IDataObject |
---|
close, getBaseDataObject, getFilename, getName, open, postProcess, setName |
Field Detail |
---|
static final int RASTER_DATA_TYPE_FLOAT
static final int RASTER_DATA_TYPE_DOUBLE
static final int RASTER_DATA_TYPE_INT
static final int RASTER_DATA_TYPE_SHORT
static final int RASTER_DATA_TYPE_BYTE
static final int INTERPOLATION_NearestNeighbour
static final int INTERPOLATION_Bilinear
static final int INTERPOLATION_InverseDistance
static final int INTERPOLATION_BicubicSpline
static final int INTERPOLATION_BSpline
Method Detail |
---|
int getDataType()
GridExtent getWindowGridExtent()
GridExtent getLayerGridExtent()
double getWindowCellSize()
double getLayerCellSize()
void assign(double dValue)
void assign(IRasterLayer layer)
void assignNoData()
void setCellValue(int x, int y, double dValue)
x
- the x coordinate (cols)y
- the y coordinate (rows)dValue
- the new valuevoid setCellValue(int x, int y, int iBand, double dValue)
x
- the x coordinate (cols)y
- the y coordinate (rows)iBand
- the band (zero-based)dValue
- the new valuevoid addToCellValue(int x, int y, double dValue)
x
- the x coordinate (cols)y
- the y coordinate (rows)dValue
- the value to sumvoid addToCellValue(int x, int y, int iBand, double dValue)
x
- the x coordinate (cols)y
- the y coordinate (rows)iBand
- the band (zero-based)dValue
- the value to sumvoid add(IRasterLayer layer)
void multiply(double d)
d
- the value to multiplydouble getNoDataValue()
void setNoDataValue(double dNoDataValue)
dNoDataValue
- the new no-data valuevoid setNoData(int x, int y, int iBand)
x
- the x coordinate(col) of the cell to set to no-datay
- the y coordinate(row) of the cell to set to no-dataiBand
- the band to set to no-datavoid setNoData(int x, int y)
x
- the x coordinate(col) of the cell to set to no-datay
- the y coordinate(row) of the cell to set to no-databoolean isNoDataValue(double dNoDataValue)
dNoDataValue
- a value to check
byte getCellValueAsByte(int x, int y, int iBand)
byte getCellValueAsByte(int x, int y)
short getCellValueAsShort(int x, int y, int iBand)
short getCellValueAsShort(int x, int y)
int getCellValueAsInt(int x, int y, int iBand)
int getCellValueAsInt(int x, int y)
float getCellValueAsFloat(int x, int y, int iBand)
float getCellValueAsFloat(int x, int y)
double getCellValueAsDouble(int x, int y, int iBand)
double getCellValueAsDouble(int x, int y)
double getCellValueInLayerCoords(int x, int y, int band)
x
- the x coordinate(col) of the celly
- the y coordinate(row) of the cellband
- the band to be queried
double getValueAt(double x, double y, int iBand)
x
- the x coordinatey
- the y coordinateiBand
- the band to query
double getValueAt(double x, double y)
x
- the x coordinatey
- the y coordinate
boolean isInWindow(int x, int y)
x
- the x coordinate(col) of the celly
- the y coordinate(row) of the cell
int getNX()
int getNY()
int getBandsCount()
void setWindowExtent(IRasterLayer layer)
layer
- the layer from which to take the extentvoid setWindowExtent(GridExtent gridExtent)
gridExtent
- the new grid extent to set fro this layervoid setFullExtent()
void fitToGridExtent(GridExtent gridExtent)
gridExtent
- the reference gridExtentvoid setInterpolationMethod(int iMethod)
iMethod
- double getMeanValue()
double getMinValue()
double getMaxValue()
double getVariance()
double getMeanValue(int iBand)
iBand
- the index of the band (zero-based)
double getMinValue(int iBand)
iBand
- the index of the band (zero-based)
double getMaxValue(int iBand)
iBand
- the index of the band (zero-based)
double getVariance(int iBand)
iBand
- the index of the band (zero-based)
double getSlope(int x, int y)
double getDistToNeighborInDir(int i)
double getAspect(int i, int j)
int getDirToNextDownslopeCell(int x, int y)
int getDirToNextDownslopeCell(int x, int y, boolean b)
int[] getHistogram()
int[] getHistogram(int iBand)
iBand
- the index of the band (zero-based)
int[] getAccumulatedHistogram()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |