|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--GRASS.CELL
This class wraps GRASS library CELL*. Note that this CELL is a row of cells and not a single CELL. See the GRASS 4.2 Programmer's Manual, Appendix B The CELL Data Type
libgis| Constructor Summary | |
CELL()
Constructs an empty object and allocates memory for a row of CELLs. |
|
| Method Summary | |
int |
cellAt(int pos)
Inquires for category value in the buffer at the position pos. |
void |
fromArray(int[] ar)
Fills the buffer with values from the provided array. |
void |
G_zero_cell_buf()
Assigns each member of raster buffer to zero. |
int |
getSize()
Returns the size of this CELL buffer in cells. |
void |
setCellAt(int pos,
int val)
Sets category value in the buffer at the position pos. |
int[] |
toArray()
Allocates array and fills it with the content of the buffer. |
int[] |
toArray(int[] ar)
Fills the provided array with the content of the buffer. |
int[] |
toColorArray(Colors colors)
Creates and fills an array with the content of the buffer converted into integer color values. |
int[] |
toColorArray(int[] ar,
Colors colors)
Fills the provided array with the content of the buffer converted into integer color values. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public CELL()
CELL *cell; cell = G_allocate_cell_buf( );See the GRASS 4.2 Programmer's Manual, Section 12.9.5 Allocating Raster I/O Buffers
gl - Previously initialized GRASS library| Method Detail |
public int getSize()
public void G_zero_cell_buf()
throws GRASSException
G_zero_cell_buf(buf); CELL *buf;See the GRASS 4.2 Programmer's Manual, Section 12.9.5 Allocating Raster I/O Buffers
public int cellAt(int pos)
throws GRASSException
pos - position in the cell buffer
public void setCellAt(int pos,
int val)
throws GRASSException
pos - position in the cell bufferval - category value position to set position topublic int[] toArray()
public int[] toArray(int[] ar)
throws GRASSException
ar - array to save buffer values to
public void fromArray(int[] ar)
throws GRASSException
ar - array to read buffer values frompublic int[] toColorArray(Colors colors)
color - Colors object used to convert original buffer valuesar - array to save color values toColor
public int[] toColorArray(int[] ar,
Colors colors)
throws GRASSException
color - Colors object used to convert original buffer valuesar - array to save color values toColorpublic java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||