|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--GRASS.Cellhead
Class to mimic behaviour of struct Cell_head from gis.h. The raster header data structure is used for two purposes. It is used for raster header information for map layers. It also used to hold region values. Wraps GRASS library struct:
struct Cell_head
{
int format; -- number of bytes per cell --
int compressed; -- compressed(1) or not compressed(0) --
int rows, cols; -- number of rows and columns --
int proj; -- projection --
int zone; -- zone --
double ew_res; -- east-west resolution --
double ns_res; -- north-south resolution --
double north; -- northern edge --
double south; -- southern edge --
double east; -- eastern edge --
double west; -- western edge --
};
See the GRASS 4.2 Programmer's Manual,
Section 12.20.1 struct Cell_head
libgis.G_get_set_window()| Constructor Summary | |
Cellhead()
Constructs an empty object and allocates memory for Cellhead structure. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates a new object of the same class as this object. |
int |
cols()
Returns value of the field 'cols' corresponding to the Cellhead. |
boolean |
compressed()
Returns value of the field 'compressed' corresponding to the Cellhead. |
double |
east()
Returns value of the field 'east' corresponding to the Cellhead. |
double |
ew_res()
Returns value of the field 'ew_res' corresponding to the Cellhead. |
int |
format()
Returns value of the field 'format' corresponding to the Cellhead. |
void |
G_adjust_Cell_head(boolean rflag,
boolean cflag)
This method fills in missing parts of the input cell header (or region). |
double |
G_col_to_easting(double col)
Converts a column relative to a region to an easting. |
double |
G_easting_to_col(double east)
Converts an easting relative to a region to a column. |
double |
G_northing_to_row(double north)
Converts a northing relative to a region to a row. |
double |
G_row_to_northing(double row)
Converts a row relative to a region to a northing. |
double |
north()
Returns value of the field 'north' corresponding to the Cellhead. |
double |
ns_res()
Returns value of the field 'ns_res' corresponding to the Cellhead. |
int |
proj()
Returns value of the field 'proj' corresponding to the Cellhead. |
int |
rows()
Returns value of the field 'rows' corresponding to the Cellhead. |
void |
setCols(int cols)
Sets value of the field 'cols' corresponding to the Cellhead. |
void |
setCompressed(boolean compressed)
Sets value of the field 'compressed' corresponding to the Cellhead. |
void |
setEast(double east)
Sets value of the field 'east' corresponding to the Cellhead. |
void |
setEw_res(double ew_res)
Sets value of the field 'ew_res' corresponding to the Cellhead. |
void |
setFormat(int format)
Sets value of the field 'format' corresponding to the Cellhead. |
void |
setNorth(double north)
Sets value of the field 'north' corresponding to the Cellhead. |
void |
setNs_res(double ns_res)
Sets value of the field 'ns_res' corresponding to the Cellhead. |
void |
setProj(int proj)
Sets value of the field 'proj' corresponding to the Cellhead. |
void |
setRows(int rows)
Sets value of the field 'rows' corresponding to the Cellhead. |
void |
setSouth(double south)
Sets value of the field 'south' corresponding to the Cellhead. |
void |
setWest(double west)
Sets value of the field 'west' corresponding to the Cellhead. |
void |
setZone(int zone)
Sets value of the field 'zone' corresponding to the Cellhead. |
double |
south()
Returns value of the field 'south' corresponding to the Cellhead. |
java.lang.String |
toString()
Returns a string representation of the object. |
double |
west()
Returns value of the field 'west' corresponding to the Cellhead. |
int |
zone()
Returns value of the field 'zone' corresponding to the Cellhead. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Cellhead()
| Method Detail |
public int format()
public void setFormat(int format)
format - format value to set topublic boolean compressed()
public void setCompressed(boolean compressed)
compressed - compressed value to set topublic int rows()
public void setRows(int rows)
rows - rows value to set topublic int cols()
public void setCols(int cols)
cols - cols value to set topublic int proj()
public void setProj(int proj)
proj - proj value to set topublic int zone()
public void setZone(int zone)
zone - zone value to set topublic double ew_res()
public void setEw_res(double ew_res)
ew_res - ew_res value to set topublic double ns_res()
public void setNs_res(double ns_res)
ns_res - ns_res value to set topublic double north()
public void setNorth(double north)
north - north value to set topublic double south()
public void setSouth(double south)
south - south value to set topublic double east()
public void setEast(double east)
east - east value to set topublic double west()
public void setWest(double west)
west - west value to set to
public void G_adjust_Cell_head(boolean rflag,
boolean cflag)
throws GRASSException
char *
G_adjust_Cell_head (cellhd, rflag, cflag)
struct Cell_head *cellhd;
int rflag, cflag;
See the GRASS 4.2 Programmer's Manual,
Section 12.10.1 Raster Header Filerflag - Flag to adjust north-south resolution from the number
of rowscflag - Flag to adjust east-west resolution from the number
of columnspublic double G_col_to_easting(double col)
double
G_col_to_easting (col, region)
double col;
struct Cell_head *region;
See the GRASS 4.2 Programmer's Manual,
Section 12.7.2 The Active Program Regioncol - column to find easting forpublic double G_row_to_northing(double row)
double
G_row_to_northing (row, region)
double row;
struct Cell_head *region;
See the GRASS 4.2 Programmer's Manual,
Section 12.7.2 The Active Program Regionrow - row to find northing forpublic double G_easting_to_col(double east)
double
G_easting_to_col (east, region)
double east;
struct Cell_head *region;
See the GRASS 4.2 Programmer's Manual,
Section 12.7.2 The Active Program Regioneast - easting to find column number forpublic double G_northing_to_row(double north)
double
G_northing_to_row (north, region)
double row;
struct Cell_head *region;
See the GRASS 4.2 Programmer's Manual,
Section 12.7.2 The Active Program Region
Note: the result is a double. Casting it to an integer
will give the row number.north - northing to find row number forpublic java.lang.Object clone()
public java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||