Interface RasterData
-
- All Known Implementing Classes:
JGrassRasterData
public interface RasterDataInterface describing a raster map for JGrass internal usage.
This was thought instead of the direct data matrix usage in order to be able to migrate to the coverage standard at some point.
- Author:
- Andrea Antonello - www.hydrologis.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCols()double[][]getData()Get the matrix of data.intgetRows()double[]getRowValue(int row)Get a row of the raster matrixdoublegetValueAt(int index)Get the raster's value at given position.doublegetValueAt(int row, int col)Get the raster's value at given row and col.doublegetValueAt(Point point)Get the raster's value at given position.voidsetValueAt(int index, double value)Set the raster's value at given position.voidsetValueAt(int row, int col, double value)Set the raster's value at given row and col.StringtoString()
-
-
-
Method Detail
-
getValueAt
double getValueAt(int row, int col)Get the raster's value at given row and col.- Parameters:
row-col-- Returns:
- the value in double format
-
getValueAt
double getValueAt(int index)
Get the raster's value at given position.- Parameters:
index-- Returns:
- the value in double format
-
getValueAt
double getValueAt(Point point)
Get the raster's value at given position.- Parameters:
point- the row, col position- Returns:
- the value in double format
-
setValueAt
void setValueAt(int row, int col, double value)Set the raster's value at given row and col.- Parameters:
row-col-value-
-
setValueAt
void setValueAt(int index, double value)Set the raster's value at given position.- Parameters:
index-value-
-
getRows
int getRows()
- Returns:
- the number of rows of the raster
-
getCols
int getCols()
- Returns:
- the number of cols of the raster
-
toString
String toString()
-
getRowValue
double[] getRowValue(int row)
Get a row of the raster matrix- Parameters:
row- the row to extract
-
getData
double[][] getData()
Get the matrix of data.- Returns:
- the matrix of data.
-
-