|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--GRASS.Categories
This class wraps GRASS library struct Categories (Raster Histogram). Categories is not documented in the GRASS 4.2 Programmer's Manual, but see Section 12.10.2 Raster Categoriy File to learn about routines that deal with struct Categories.
| Constructor Summary | |
Categories(int n,
java.lang.String title)
Constructs an empty object, allocates memory and initializes GRASS struct Categories. |
|
| Method Summary | |
java.lang.String |
G_get_cat(int cat)
This method looks up category n and returns a string which is the label for the category. |
java.lang.String |
G_get_cats_title()
Gets title from this category structure. |
void |
G_set_cat(int cat,
java.lang.String label)
The label is copied into the cats structure for category n. |
void |
G_set_cats_title(java.lang.String title)
Sets the title of this Categories structure. |
void |
G_write_cats(java.lang.String name)
Writes the category file for the raster file name in the current mapset. |
void |
G_write_vector_cats(java.lang.String name)
Writes the category file for the vector file name in the current mapset. |
int |
num()
Returns the value of Categories->num field in struct Categories. |
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 Categories(int n,
java.lang.String title)
| Method Detail |
public int num()
public void G_write_cats(java.lang.String name)
throws GRASSException
G_write_cats (name, cats)
char *name;
struct Categories *cats;
See the GRASS 4.2 Programmer's Manual,
Section 12.10.2.1. Reading and Writing the Raster Category Filename - raster layer name
public void G_write_vector_cats(java.lang.String name)
throws GRASSException
G_write_cats (name, cats)
char *name;
struct Categories *cats;
See the GRASS 4.2 Programmer's Manual,
Section 12.11.6 Vector Category Filename - vector layer namepublic java.lang.String G_get_cat(int cat)
char *
G_get_cat (n, cats)
CELL n;
struct Categories *cats;
See the GRASS 4.2 Programmer's Manual,
Section 12.10.2.2 Querying and Changing the Categories Structuren - category value to look label forpublic java.lang.String G_get_cats_title()
char*
G_get_cell_title(cats)
struct Categories *cats;
See the GRASS 4.2 Programmer's Manual,
Section 12.10.2.2. Querying and Changing the Categories Structurepublic void G_set_cats_title(java.lang.String title)
G_set_cats_title (title, cats)
char *title;
struct Categories *cats;
See the GRASS 4.2 Programmer's Manual,
Section 12.10.2.2. Querying and Changing the Categories Structuretitle - title to set
public void G_set_cat(int cat,
java.lang.String label)
G_set_cat (n, label, cats)
CELL n;
char *label;
struct Categories *cats;
See the GRASS 4.2 Programmer's Manual,
Section 12.10.2.2.Querying and Changing the Categories Structurecat - category to modifylabel - new category labelpublic java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||