|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--analysis.java.Raster
Class to handle Raster object and methods to read file to/from Raster; also includes methods for accessing data values
| Constructor Summary | |
Raster()
Creates a generic Raster object |
|
Raster(int rows,
int cols)
Creates a Raster object; with a set number of rows and columns |
|
Raster(java.lang.String rasterfile)
Creates a Raster object from a tab-delimited text file |
|
| Method Summary | |
int |
getCol(int id)
Get column at cell id |
float |
getData(int id)
Get value at position id |
float |
getData(int i,
int j)
Get value at row i, col j |
int |
getID(int row,
int col)
Get id at row i, col j |
int |
getNumCols()
Get number of columns in Raster |
int |
getNumRows()
Get number of rows in Raster |
int |
getRow(int id)
Get row at cell id |
void |
read(java.lang.String rasterfile)
Read tab-delimited file into Raster object |
void |
setData(float value,
int id)
Enter value at cell id |
void |
setData(float value,
int row,
int col)
Enter value at row i, col j |
java.util.ArrayList |
toArrayList(analysis.java.Raster raster,
int keepValue)
Convert a binary Raster (e.g. |
analysis.java.Raster |
toRaster(java.util.ArrayList list,
int rows,
int cols)
Convert an ArrayList to Raster |
analysis.java.Raster |
toRaster(java.util.TreeMap tree,
int rows,
int cols)
Convert a TreeMap to Raster |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Raster()
public Raster(java.lang.String rasterfile)
rasterfile - full path name for text file
public Raster(int rows,
int cols)
rows - number of rowscols - number of columns| Method Detail |
public float getData(int i,
int j)
i - row #j - column #
public float getData(int id)
id - cell number
public void setData(float value,
int row,
int col)
value - value to be enteredrow - row #col - column #
public void setData(float value,
int id)
value - value to be entered into raster at cell idid - cell id where value is to be entered
public int getID(int row,
int col)
row - row #col - column#
public int getRow(int id)
id - cell id for which row# is sought
public int getCol(int id)
id - cell id for which column# is sought
public int getNumRows()
public int getNumCols()
public java.util.ArrayList toArrayList(analysis.java.Raster raster,
int keepValue)
raster - Raster object to be convertedkeepValue - binary value that is to be retained, e.g. "1" or "0"
public analysis.java.Raster toRaster(java.util.ArrayList list,
int rows,
int cols)
list - name of ArrayList to be convertedrows - # of rows in Rastercols - # of columns in Raster
public analysis.java.Raster toRaster(java.util.TreeMap tree,
int rows,
int cols)
tree - name of TreeMap to be convertedrows - # of rows in Rastercols - # of columns in Rasterpublic void read(java.lang.String rasterfile)
rasterfile -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||