|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
|
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. | |
| void | Rast_get_input_window (struct Cell_head *window) |
| Read the current input window. | |
| void | Rast_get_output_window (struct Cell_head *window) |
| Read the current output window. | |
| int | Rast_window_rows (void) |
| Number of rows in active window. | |
| int | Rast_window_cols (void) |
| Number of columns in active window. | |
| int | Rast_input_window_rows (void) |
| Number of rows in active input window. | |
| int | Rast_input_window_cols (void) |
| Number of columns in active input window. | |
| int | Rast_output_window_rows (void) |
| Number of rows in active output window. | |
| int | Rast_output_window_cols (void) |
| Number of columns in active output window. | |
| double | Rast_northing_to_row (double north, const struct Cell_head *window) |
| Northing to row. | |
| double | Rast_easting_to_col (double east, const struct Cell_head *window) |
| Easting to column. | |
| double | Rast_row_to_northing (double row, const struct Cell_head *window) |
| Row to northing. | |
| double | Rast_col_to_easting (double col, const struct Cell_head *window) |
| Column to easting. | |
Raster Library - Window functions.
SPDX-FileCopyrightText: 2001-2009 GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later
Definition in file raster/window.c.
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 262 of file raster/window.c.
References Cell_head::ew_res, and Cell_head::west.
Referenced by P_Read_Raster_Region_Map(), and P_Regular_Points().
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 219 of file raster/window.c.
References Cell_head::ew_res, G_adjust_easting(), and Cell_head::west.
Referenced by Rast_get_sample_bilinear(), Rast_get_sample_cubic(), and Rast_get_sample_nearest().
Read the current input window.
| window | pointer to Cell_head |
Definition at line 41 of file raster/window.c.
References Rast__init_window(), and R__::rd_window.
Read the current output window.
| window | pointer to Cell_head |
Definition at line 53 of file raster/window.c.
References Rast__init_window(), and R__::wr_window.
Read the current window.
| window | pointer to Cell_head |
Definition at line 23 of file raster/window.c.
References _, G_fatal_error(), Rast__init_window(), R__::split_window, and R__::wr_window.
Number of columns in active input window.
This routine returns the number of columns in the active input window.
Definition at line 153 of file raster/window.c.
References 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().
Number of rows in active input window.
This routine returns the number of rows in the active input window.
Definition at line 139 of file raster/window.c.
References Rast__init_window(), and R__::rd_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 201 of file raster/window.c.
References Cell_head::north, and Cell_head::ns_res.
Referenced by Rast_get_sample_bilinear(), Rast_get_sample_cubic(), and Rast_get_sample_nearest().
Number of columns in active output window.
This routine returns the number of columns in the active output window.
Definition at line 181 of file raster/window.c.
References 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().
Number of rows in active output window.
This routine returns the number of rows in the active output window.
Definition at line 167 of file raster/window.c.
References Rast__init_window(), and R__::wr_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 242 of file raster/window.c.
References Cell_head::north, and Cell_head::ns_res.
Referenced by P_Read_Raster_Region_Map(), and P_Regular_Points().
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 119 of file raster/window.c.
References _, G_fatal_error(), Rast__init_window(), R__::split_window, and R__::wr_window.
Referenced by create_raster(), P_Aux_to_Raster(), Rast_allocate_buf(), Rast_allocate_c_buf(), Rast_allocate_d_buf(), Rast_allocate_f_buf(), Rast_allocate_null_buf(), Rast_get_row_colors(), Rast_get_sample_bilinear(), Rast_get_sample_cubic(), Rast_get_sample_nearest(), Rast_map_to_img_str(), and Rast_zero_buf().
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 82 of file raster/window.c.
References _, G_fatal_error(), Rast__init_window(), R__::split_window, and R__::wr_window.
Referenced by create_raster(), I_compute_scatts(), P_Aux_to_Raster(), Rast_get_sample_bilinear(), Rast_get_sample_cubic(), Rast_get_sample_nearest(), and Rast_map_to_img_str().