|
GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
Raster Library - Window mapping functions. More...

Go to the source code of this file.
Macros | |
| #define | alloc_index(n) (COLUMN_MAPPING *) G_malloc((n)*sizeof(COLUMN_MAPPING)) |
Functions | |
| void | Rast__create_window_mapping (int fd) |
| Create window mapping. More... | |
| int | Rast_row_repeat_nomask (int fd, int row) |
| Loops rows until mismatch?. More... | |
Raster Library - Window mapping 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_map.c.
| #define alloc_index | ( | n | ) | (COLUMN_MAPPING *) G_malloc((n)*sizeof(COLUMN_MAPPING)) |
Definition at line 21 of file raster/window_map.c.
Referenced by Rast__create_window_mapping().
| void Rast__create_window_mapping | ( | int | fd | ) |
Create window mapping.
Creates mapping from cell header into window. The boundaries and resolution of the two spaces do not have to be the same or aligned in any way.
| fd | file descriptor |
Definition at line 33 of file raster/window_map.c.
References alloc_index, fileinfo::C1, fileinfo::C2, fileinfo::cellhd, fileinfo::col_map, Cell_head::cols, Cell_head::east, Cell_head::ew_res, R__::fileinfo, G_debug(), G_free(), Cell_head::north, Cell_head::ns_res, fileinfo::open_mode, OPEN_OLD, Cell_head::proj, PROJECTION_LL, R__::rd_window, Cell_head::west, and x.
| int Rast_row_repeat_nomask | ( | int | fd, |
| int | row | ||
| ) |
Loops rows until mismatch?.
This routine works fine if the mask is not set. It may give incorrect results with a mask, since the mask row may have a different repeat value. The issue can be fixed by doing it for the mask as well and using the smaller value.
| fd | file descriptor |
| row | starting row |
Definition at line 134 of file raster/window_map.c.
References fileinfo::C1, fileinfo::C2, count, R__::fileinfo, R__::rd_window, and Cell_head::rows.