GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-d6dec75dd4
|
Raster Library - Window functions. More...
Go to the source code of this file.
Functions | |
void | Rast_get_window (struct Cell_head *window) |
Read the current window. More... | |
void | Rast_get_input_window (struct Cell_head *window) |
Read the current input window. More... | |
void | Rast_get_output_window (struct Cell_head *window) |
Read the current output window. More... | |
int | Rast_window_rows (void) |
Number of rows in active window. More... | |
int | Rast_window_cols (void) |
Number of columns in active window. More... | |
int | Rast_input_window_rows (void) |
Number of rows in active input window. More... | |
int | Rast_input_window_cols (void) |
Number of columns in active input window. More... | |
int | Rast_output_window_rows (void) |
Number of rows in active output window. More... | |
int | Rast_output_window_cols (void) |
Number of columns in active output window. More... | |
double | Rast_northing_to_row (double north, const struct Cell_head *window) |
Northing to row. More... | |
double | Rast_easting_to_col (double east, const struct Cell_head *window) |
Easting to column. More... | |
double | Rast_row_to_northing (double row, const struct Cell_head *window) |
Row to northing. More... | |
double | Rast_col_to_easting (double col, const struct Cell_head *window) |
Column to easting. More... | |
Raster Library - Window functions.
(C) 2001-2009 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file raster/window.c.
double Rast_col_to_easting | ( | double | col, |
const struct Cell_head * | window | ||
) |
Column to easting.
Converts a col relative to a window to an easting.
Note: col is a double:
col | column number | |
[in] | window | pointer to Cell_head |
Definition at line 269 of file raster/window.c.
double Rast_easting_to_col | ( | double | east, |
const struct Cell_head * | window | ||
) |
Easting to column.
Converts east relative to a window to a column.
Note: The result is a double. Casting it to an int will give the column number.
east | east coordinate |
window | pointer to Cell_head |
Definition at line 226 of file raster/window.c.
void Rast_get_input_window | ( | struct Cell_head * | window | ) |
Read the current input window.
window | pointer to Cell_head |
Definition at line 45 of file raster/window.c.
void Rast_get_output_window | ( | struct Cell_head * | window | ) |
Read the current output window.
window | pointer to Cell_head |
Definition at line 58 of file raster/window.c.
void Rast_get_window | ( | struct Cell_head * | window | ) |
Read the current window.
window | pointer to Cell_head |
Definition at line 26 of file raster/window.c.
int Rast_input_window_cols | ( | void | ) |
Number of columns in active input window.
This routine returns the number of columns in the active input window.
Definition at line 158 of file raster/window.c.
References Cell_head::cols, Rast__init_window(), and R__::rd_window.
Referenced by Rast_allocate_c_input_buf(), Rast_allocate_d_input_buf(), Rast_allocate_f_input_buf(), Rast_allocate_input_buf(), Rast_allocate_null_input_buf(), and Rast_zero_input_buf().
int Rast_input_window_rows | ( | void | ) |
Number of rows in active input window.
This routine returns the number of rows in the active input window.
Definition at line 144 of file raster/window.c.
References Rast__init_window(), R__::rd_window, and Cell_head::rows.
double Rast_northing_to_row | ( | double | north, |
const struct Cell_head * | window | ||
) |
Northing to row.
Converts a northing relative to a window to a row.
Note: The result is a double. Casting it to an integer will give the row number.
north | northing value |
window | pointer to Cell_head |
Definition at line 207 of file raster/window.c.
int Rast_output_window_cols | ( | void | ) |
Number of columns in active output window.
This routine returns the number of columns in the active output window.
Definition at line 186 of file raster/window.c.
References Cell_head::cols, Rast__init_window(), and R__::wr_window.
Referenced by Rast_allocate_c_output_buf(), Rast_allocate_d_output_buf(), Rast_allocate_f_output_buf(), Rast_allocate_null_output_buf(), Rast_allocate_output_buf(), and Rast_zero_output_buf().
int Rast_output_window_rows | ( | void | ) |
Number of rows in active output window.
This routine returns the number of rows in the active output window.
Definition at line 172 of file raster/window.c.
References Rast__init_window(), Cell_head::rows, and R__::wr_window.
double Rast_row_to_northing | ( | double | row, |
const struct Cell_head * | window | ||
) |
Row to northing.
Converts a row relative to a window to a northing.
Note: row is a double:
row | row number | |
[in] | window | pointer to Cell_head |
Definition at line 249 of file raster/window.c.
int Rast_window_cols | ( | void | ) |
Number of columns in active window.
These routines return the number of rows and columns (respectively) in the active module region. Before raster maps can be read or written, it is necessary to known how many rows and columns are in the active region. For example:
Definition at line 124 of file raster/window.c.
References _, Cell_head::cols, G_fatal_error(), Rast__init_window(), R__::split_window, and R__::wr_window.
Referenced by Rast_allocate_buf(), Rast_allocate_c_buf(), Rast_allocate_d_buf(), Rast_allocate_f_buf(), Rast_allocate_null_buf(), and Rast_zero_buf().
int Rast_window_rows | ( | void | ) |
Number of rows in active window.
This routine returns the number of rows in the active module window. Before raster files can be read or written, it is necessary to known how many rows are in the active window. For example:
Definition at line 87 of file raster/window.c.
References _, G_fatal_error(), Rast__init_window(), Cell_head::rows, R__::split_window, and R__::wr_window.