|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openjump.core.rasterimage.sextante.AbstractSextanteRasterLayer
public abstract class AbstractSextanteRasterLayer
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 | |
|---|---|
protected java.lang.Object |
m_BaseDataObject
|
| Fields inherited from interface org.openjump.core.rasterimage.sextante.ISextanteRasterLayer |
|---|
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 | |
|---|---|
AbstractSextanteRasterLayer()
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openjump.core.rasterimage.sextante.ISextanteRasterLayer |
|---|
fitToGridExtent, getBandsCount, getCellValueInLayerCoords, getDataType, getLayerCellSize, getLayerGridExtent, getNoDataValue, setCellValue, setNoDataValue |
| Methods inherited from interface org.openjump.core.rasterimage.sextante.ISextanteLayer |
|---|
getCRS, getFullExtent |
| Methods inherited from interface org.openjump.core.rasterimage.sextante.ISextanteDataObject |
|---|
close, getFilename, getName, open, postProcess, setName |
| Field Detail |
|---|
protected java.lang.Object m_BaseDataObject
| Constructor Detail |
|---|
public AbstractSextanteRasterLayer()
| Method Detail |
|---|
public java.lang.Object getBaseDataObject()
ISextanteDataObject
getBaseDataObject in interface ISextanteDataObjectpublic 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 ISextanteRasterLayerx - the x coordinatey - the y coordinate
public double getValueAt(double x,
double y,
int band)
ISextanteRasterLayer
getValueAt in interface ISextanteRasterLayerx - the x coordinatey - the y coordinateband - the band to query
public boolean isNoDataValue(double dValue)
ISextanteRasterLayer
isNoDataValue in interface ISextanteRasterLayerdValue - a value to check
public boolean isInWindow(int x,
int y)
isInWindow in interface ISextanteRasterLayerx - the x coordinate(col) of the celly - the y coordinate(row) of the cell
public int getNX()
ISextanteRasterLayer
getNX in interface ISextanteRasterLayerpublic int getNY()
ISextanteRasterLayer
getNY in interface ISextanteRasterLayerpublic double getWindowCellSize()
ISextanteRasterLayer
getWindowCellSize in interface ISextanteRasterLayerpublic GridExtent getWindowGridExtent()
ISextanteRasterLayer
getWindowGridExtent in interface ISextanteRasterLayerpublic void assign(double dValue)
assign in interface ISextanteRasterLayerpublic void assign(ISextanteRasterLayer layer)
assign in interface ISextanteRasterLayerpublic void add(ISextanteRasterLayer driver)
ISextanteRasterLayer
add in interface ISextanteRasterLayerpublic void assignNoData()
assignNoData in interface ISextanteRasterLayer
public void setCellValue(int x,
int y,
double dValue)
ISextanteRasterLayer
setCellValue in interface ISextanteRasterLayerx - the x coordinate (cols)y - the y coordinate (rows)dValue - the new value
public void setNoData(int x,
int y)
ISextanteRasterLayer
setNoData in interface ISextanteRasterLayerx - the x coordinate(col) of the cell to set to no-datay - the y coordinate(row) of the cell to set to no-data
public void setNoData(int x,
int y,
int iBand)
ISextanteRasterLayer
setNoData in interface ISextanteRasterLayerx - 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-data
public void addToCellValue(int x,
int y,
int iBand,
double dValue)
ISextanteRasterLayer
addToCellValue in interface ISextanteRasterLayerx - the x coordinate (cols)y - the y coordinate (rows)iBand - the band (zero-based)dValue - the value to sum
public void addToCellValue(int x,
int y,
double dValue)
ISextanteRasterLayer
addToCellValue in interface ISextanteRasterLayerx - the x coordinate (cols)y - the y coordinate (rows)dValue - the value to sumpublic void multiply(double dValue)
ISextanteRasterLayer
multiply in interface ISextanteRasterLayerdValue - the value to multiplypublic void setWindowExtent(ISextanteRasterLayer layer)
ISextanteRasterLayer
setWindowExtent in interface ISextanteRasterLayerlayer - the layer from which to take the extentpublic void setWindowExtent(GridExtent extent)
ISextanteRasterLayer
setWindowExtent in interface ISextanteRasterLayerextent - the new grid extent to set fro this layerpublic void setFullExtent()
ISextanteRasterLayer
setFullExtent in interface ISextanteRasterLayerpublic int[] getHistogram(int iBand)
ISextanteRasterLayer
getHistogram in interface ISextanteRasterLayeriBand - the index of the band (zero-based)
public int[] getHistogram()
ISextanteRasterLayer
getHistogram in interface ISextanteRasterLayerpublic int[] getAccumulatedHistogram(int iBand)
public int[] getAccumulatedHistogram()
getAccumulatedHistogram in interface ISextanteRasterLayerpublic double getMinValue(int iBand)
ISextanteRasterLayer
getMinValue in interface ISextanteRasterLayeriBand - the index of the band (zero-based)
public double getMaxValue(int iBand)
ISextanteRasterLayer
getMaxValue in interface ISextanteRasterLayeriBand - the index of the band (zero-based)
public double getMeanValue(int iBand)
ISextanteRasterLayer
getMeanValue in interface ISextanteRasterLayeriBand - the index of the band (zero-based)
public double getVariance(int iBand)
ISextanteRasterLayer
getVariance in interface ISextanteRasterLayeriBand - the index of the band (zero-based)
public double getMeanValue()
ISextanteRasterLayer
getMeanValue in interface ISextanteRasterLayerpublic double getMinValue()
ISextanteRasterLayer
getMinValue in interface ISextanteRasterLayerpublic double getMaxValue()
ISextanteRasterLayer
getMaxValue in interface ISextanteRasterLayerpublic 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 ISextanteRasterLayerpublic double getDistToNeighborInDir(int iDir)
getDistToNeighborInDir in interface ISextanteRasterLayerpublic 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 ISextanteRasterLayerpublic 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 | |||||||||