|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.unex.sextante.dataObjects.AbstractRasterLayer
public abstract class AbstractRasterLayer
A convenience class which implements some of the methods of the IRasterLayer interface. Extending this class is recommended instead of implementing the interface directly
Field Summary |
---|
Fields inherited from interface es.unex.sextante.dataObjects.IRasterLayer |
---|
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 Summary | |
---|---|
AbstractRasterLayer()
|
Method Summary | |
---|---|
void |
add(IRasterLayer 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(IRasterLayer 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(IRasterLayer layer)
Sets the extent of the query window using the full extent of another layer |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface es.unex.sextante.dataObjects.IRasterLayer |
---|
fitToGridExtent, getBandsCount, getCellValueInLayerCoords, getDataType, getLayerCellSize, getLayerGridExtent, getNoDataValue, setCellValue, setNoDataValue |
Methods inherited from interface es.unex.sextante.dataObjects.ILayer |
---|
getCRS, getFullExtent |
Methods inherited from interface es.unex.sextante.dataObjects.IDataObject |
---|
close, getFilename, getName, open, postProcess, setName |
Constructor Detail |
---|
public AbstractRasterLayer()
Method Detail |
---|
public java.lang.Object getBaseDataObject()
IDataObject
getBaseDataObject
in interface IDataObject
public void setInterpolationMethod(int iMethod)
IRasterLayer
setInterpolationMethod
in interface IRasterLayer
public byte getCellValueAsByte(int x, int y)
getCellValueAsByte
in interface IRasterLayer
public byte getCellValueAsByte(int x, int y, int band)
getCellValueAsByte
in interface IRasterLayer
public short getCellValueAsShort(int x, int y)
getCellValueAsShort
in interface IRasterLayer
public short getCellValueAsShort(int x, int y, int band)
getCellValueAsShort
in interface IRasterLayer
public int getCellValueAsInt(int x, int y)
getCellValueAsInt
in interface IRasterLayer
public int getCellValueAsInt(int x, int y, int band)
getCellValueAsInt
in interface IRasterLayer
public float getCellValueAsFloat(int x, int y)
getCellValueAsFloat
in interface IRasterLayer
public float getCellValueAsFloat(int x, int y, int band)
getCellValueAsFloat
in interface IRasterLayer
public double getCellValueAsDouble(int x, int y)
getCellValueAsDouble
in interface IRasterLayer
public double getCellValueAsDouble(int x, int y, int band)
getCellValueAsDouble
in interface IRasterLayer
public double getValueAt(double x, double y)
IRasterLayer
getValueAt
in interface IRasterLayer
x
- the x coordinatey
- the y coordinate
public double getValueAt(double x, double y, int band)
IRasterLayer
getValueAt
in interface IRasterLayer
x
- the x coordinatey
- the y coordinateband
- the band to query
public boolean isNoDataValue(double dValue)
IRasterLayer
isNoDataValue
in interface IRasterLayer
dValue
- a value to check
public boolean isInWindow(int x, int y)
isInWindow
in interface IRasterLayer
x
- the x coordinate(col) of the celly
- the y coordinate(row) of the cell
public int getNX()
IRasterLayer
getNX
in interface IRasterLayer
public int getNY()
IRasterLayer
getNY
in interface IRasterLayer
public double getWindowCellSize()
IRasterLayer
getWindowCellSize
in interface IRasterLayer
public GridExtent getWindowGridExtent()
IRasterLayer
getWindowGridExtent
in interface IRasterLayer
public void assign(double dValue)
assign
in interface IRasterLayer
public void assign(IRasterLayer layer)
assign
in interface IRasterLayer
public void add(IRasterLayer driver)
IRasterLayer
add
in interface IRasterLayer
public void assignNoData()
assignNoData
in interface IRasterLayer
public void setCellValue(int x, int y, double dValue)
IRasterLayer
setCellValue
in interface IRasterLayer
x
- the x coordinate (cols)y
- the y coordinate (rows)dValue
- the new valuepublic void setNoData(int x, int y)
IRasterLayer
setNoData
in interface IRasterLayer
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)
IRasterLayer
setNoData
in interface IRasterLayer
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)
IRasterLayer
addToCellValue
in interface IRasterLayer
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)
IRasterLayer
addToCellValue
in interface IRasterLayer
x
- the x coordinate (cols)y
- the y coordinate (rows)dValue
- the value to sumpublic void multiply(double dValue)
IRasterLayer
multiply
in interface IRasterLayer
dValue
- the value to multiplypublic void setWindowExtent(IRasterLayer layer)
IRasterLayer
setWindowExtent
in interface IRasterLayer
layer
- the layer from which to take the extentpublic void setWindowExtent(GridExtent extent)
IRasterLayer
setWindowExtent
in interface IRasterLayer
extent
- the new grid extent to set fro this layerpublic void setFullExtent()
IRasterLayer
setFullExtent
in interface IRasterLayer
public int[] getHistogram(int iBand)
IRasterLayer
getHistogram
in interface IRasterLayer
iBand
- the index of the band (zero-based)
public int[] getHistogram()
IRasterLayer
getHistogram
in interface IRasterLayer
public int[] getAccumulatedHistogram(int iBand)
public int[] getAccumulatedHistogram()
getAccumulatedHistogram
in interface IRasterLayer
public double getMinValue(int iBand)
IRasterLayer
getMinValue
in interface IRasterLayer
iBand
- the index of the band (zero-based)
public double getMaxValue(int iBand)
IRasterLayer
getMaxValue
in interface IRasterLayer
iBand
- the index of the band (zero-based)
public double getMeanValue(int iBand)
IRasterLayer
getMeanValue
in interface IRasterLayer
iBand
- the index of the band (zero-based)
public double getVariance(int iBand)
IRasterLayer
getVariance
in interface IRasterLayer
iBand
- the index of the band (zero-based)
public double getMeanValue()
IRasterLayer
getMeanValue
in interface IRasterLayer
public double getMinValue()
IRasterLayer
getMinValue
in interface IRasterLayer
public double getMaxValue()
IRasterLayer
getMaxValue
in interface IRasterLayer
public double getVariance()
IRasterLayer
getVariance
in interface IRasterLayer
public double getSlope(int x, int y)
getSlope
in interface IRasterLayer
public double getAspect(int x, int y)
getAspect
in interface IRasterLayer
public double getDistToNeighborInDir(int iDir)
getDistToNeighborInDir
in interface IRasterLayer
public static double getUnitDistToNeighborInDir(int iDir)
public int getDirToNextDownslopeCell(int x, int y)
getDirToNextDownslopeCell
in interface IRasterLayer
public int getDirToNextDownslopeCell(int x, int y, boolean bForceDirToNoDataCell)
getDirToNextDownslopeCell
in interface IRasterLayer
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |