public abstract class AbstractSextanteRasterLayer extends java.lang.Object implements ISextanteRasterLayer
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
m_BaseDataObject |
INTERPOLATION_BicubicSpline, INTERPOLATION_Bilinear, INTERPOLATION_BSpline, INTERPOLATION_InverseDistance, INTERPOLATION_NearestNeighbour, RASTER_DATA_TYPE_BYTE, RASTER_DATA_TYPE_DOUBLE, RASTER_DATA_TYPE_FLOAT, RASTER_DATA_TYPE_INT, RASTER_DATA_TYPE_SHORT
Constructor and Description |
---|
AbstractSextanteRasterLayer() |
Modifier and Type | Method and Description |
---|---|
void |
add(ISextanteRasterLayer driver)
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(ISextanteRasterLayer layer) |
void |
assignNoData() |
int[] |
getAccumulatedHistogram() |
int[] |
getAccumulatedHistogram(int iBand) |
double |
getAspect(int x,
int y) |
java.lang.Object |
getBaseDataObject()
Returns the base data object (i.e. the object that
this class wraps, which contains the data itself)
|
byte |
getCellValueAsByte(int x,
int y) |
byte |
getCellValueAsByte(int x,
int y,
int band) |
double |
getCellValueAsDouble(int x,
int y) |
double |
getCellValueAsDouble(int x,
int y,
int band) |
float |
getCellValueAsFloat(int x,
int y) |
float |
getCellValueAsFloat(int x,
int y,
int band) |
int |
getCellValueAsInt(int x,
int y) |
int |
getCellValueAsInt(int x,
int y,
int band) |
short |
getCellValueAsShort(int x,
int y) |
short |
getCellValueAsShort(int x,
int y,
int band) |
int |
getDirToNextDownslopeCell(int x,
int y) |
int |
getDirToNextDownslopeCell(int x,
int y,
boolean bForceDirToNoDataCell) |
double |
getDistToNeighborInDir(int iDir) |
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 |
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
|
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) |
static double |
getUnitDistToNeighborInDir(int iDir) |
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 band)
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 dValue)
Checks if the given value equals the no-data value of the layer
|
void |
multiply(double dValue)
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 |
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 |
setWindowExtent(GridExtent extent)
Sets a new query window extent
|
void |
setWindowExtent(ISextanteRasterLayer layer)
Sets the extent of the query window using the full extent of another layer
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fitToGridExtent, getBandsCount, getCellValueInLayerCoords, getDataType, getLayerCellSize, getLayerGridExtent, getNoDataValue, setCellValue, setNoDataValue
getCRS, getFullExtent
close, getFilename, getName, open, postProcess, setName
public java.lang.Object getBaseDataObject()
ISextanteDataObject
getBaseDataObject
in interface ISextanteDataObject
public void setInterpolationMethod(int iMethod)
ISextanteRasterLayer
setInterpolationMethod
in interface ISextanteRasterLayer
public byte getCellValueAsByte(int x, int y)
getCellValueAsByte
in interface ISextanteRasterLayer
public byte getCellValueAsByte(int x, int y, int band)
getCellValueAsByte
in interface ISextanteRasterLayer
public short getCellValueAsShort(int x, int y)
getCellValueAsShort
in interface ISextanteRasterLayer
public short getCellValueAsShort(int x, int y, int band)
getCellValueAsShort
in interface ISextanteRasterLayer
public int getCellValueAsInt(int x, int y)
getCellValueAsInt
in interface ISextanteRasterLayer
public int getCellValueAsInt(int x, int y, int band)
getCellValueAsInt
in interface ISextanteRasterLayer
public float getCellValueAsFloat(int x, int y)
getCellValueAsFloat
in interface ISextanteRasterLayer
public float getCellValueAsFloat(int x, int y, int band)
getCellValueAsFloat
in interface ISextanteRasterLayer
public double getCellValueAsDouble(int x, int y)
getCellValueAsDouble
in interface ISextanteRasterLayer
public double getCellValueAsDouble(int x, int y, int band)
getCellValueAsDouble
in interface ISextanteRasterLayer
public double getValueAt(double x, double y)
ISextanteRasterLayer
getValueAt
in interface ISextanteRasterLayer
x
- the x coordinatey
- the y coordinatepublic double getValueAt(double x, double y, int band)
ISextanteRasterLayer
getValueAt
in interface ISextanteRasterLayer
x
- the x coordinatey
- the y coordinateband
- the band to querypublic boolean isNoDataValue(double dValue)
ISextanteRasterLayer
isNoDataValue
in interface ISextanteRasterLayer
dValue
- a value to checkpublic boolean isInWindow(int x, int y)
isInWindow
in interface ISextanteRasterLayer
x
- the x coordinate(col) of the celly
- the y coordinate(row) of the cellpublic int getNX()
ISextanteRasterLayer
getNX
in interface ISextanteRasterLayer
public int getNY()
ISextanteRasterLayer
getNY
in interface ISextanteRasterLayer
public double getWindowCellSize()
ISextanteRasterLayer
getWindowCellSize
in interface ISextanteRasterLayer
public GridExtent getWindowGridExtent()
ISextanteRasterLayer
getWindowGridExtent
in interface ISextanteRasterLayer
public void assign(double dValue)
assign
in interface ISextanteRasterLayer
public void assign(ISextanteRasterLayer layer)
assign
in interface ISextanteRasterLayer
public void add(ISextanteRasterLayer driver)
ISextanteRasterLayer
add
in interface ISextanteRasterLayer
public void assignNoData()
assignNoData
in interface ISextanteRasterLayer
public void setCellValue(int x, int y, double dValue)
ISextanteRasterLayer
setCellValue
in interface ISextanteRasterLayer
x
- the x coordinate (cols)y
- the y coordinate (rows)dValue
- the new valuepublic void setNoData(int x, int y)
ISextanteRasterLayer
setNoData
in interface ISextanteRasterLayer
x
- the x coordinate(col) of the cell to set to no-datay
- the y coordinate(row) of the cell to set to no-datapublic void setNoData(int x, int y, int iBand)
ISextanteRasterLayer
setNoData
in interface ISextanteRasterLayer
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-datapublic void addToCellValue(int x, int y, int iBand, double dValue)
ISextanteRasterLayer
addToCellValue
in interface ISextanteRasterLayer
x
- the x coordinate (cols)y
- the y coordinate (rows)iBand
- the band (zero-based)dValue
- the value to sumpublic void addToCellValue(int x, int y, double dValue)
ISextanteRasterLayer
addToCellValue
in interface ISextanteRasterLayer
x
- the x coordinate (cols)y
- the y coordinate (rows)dValue
- the value to sumpublic void multiply(double dValue)
ISextanteRasterLayer
multiply
in interface ISextanteRasterLayer
dValue
- the value to multiplypublic void setWindowExtent(ISextanteRasterLayer layer)
ISextanteRasterLayer
setWindowExtent
in interface ISextanteRasterLayer
layer
- the layer from which to take the extentpublic void setWindowExtent(GridExtent extent)
ISextanteRasterLayer
setWindowExtent
in interface ISextanteRasterLayer
extent
- the new grid extent to set fro this layerpublic void setFullExtent()
ISextanteRasterLayer
setFullExtent
in interface ISextanteRasterLayer
public int[] getHistogram(int iBand)
ISextanteRasterLayer
getHistogram
in interface ISextanteRasterLayer
iBand
- the index of the band (zero-based)public int[] getHistogram()
ISextanteRasterLayer
getHistogram
in interface ISextanteRasterLayer
public int[] getAccumulatedHistogram(int iBand)
public int[] getAccumulatedHistogram()
getAccumulatedHistogram
in interface ISextanteRasterLayer
public double getMinValue(int iBand)
ISextanteRasterLayer
getMinValue
in interface ISextanteRasterLayer
iBand
- the index of the band (zero-based)public double getMaxValue(int iBand)
ISextanteRasterLayer
getMaxValue
in interface ISextanteRasterLayer
iBand
- the index of the band (zero-based)public double getMeanValue(int iBand)
ISextanteRasterLayer
getMeanValue
in interface ISextanteRasterLayer
iBand
- the index of the band (zero-based)public double getVariance(int iBand)
ISextanteRasterLayer
getVariance
in interface ISextanteRasterLayer
iBand
- the index of the band (zero-based)public double getMeanValue()
ISextanteRasterLayer
getMeanValue
in interface ISextanteRasterLayer
public double getMinValue()
ISextanteRasterLayer
getMinValue
in interface ISextanteRasterLayer
public double getMaxValue()
ISextanteRasterLayer
getMaxValue
in interface ISextanteRasterLayer
public double getVariance()
ISextanteRasterLayer
getVariance
in interface ISextanteRasterLayer
public double getSlope(int x, int y)
getSlope
in interface ISextanteRasterLayer
public double getAspect(int x, int y)
getAspect
in interface ISextanteRasterLayer
public double getDistToNeighborInDir(int iDir)
getDistToNeighborInDir
in interface ISextanteRasterLayer
public static double getUnitDistToNeighborInDir(int iDir)
public int getDirToNextDownslopeCell(int x, int y)
getDirToNextDownslopeCell
in interface ISextanteRasterLayer
public int getDirToNextDownslopeCell(int x, int y, boolean bForceDirToNoDataCell)
getDirToNextDownslopeCell
in interface ISextanteRasterLayer
public java.lang.String toString()
toString
in class java.lang.Object