2
#include <grass/raster.h>
3
#include <grass/glocale.h>
5
DCELL **read_cell(const char *name)
7
int nrows = Rast_window_rows();
8
int ncols = Rast_window_cols();
13
fd = Rast_open_old(name, "");
15
buf = G_malloc((size_t) nrows * ncols * sizeof(DCELL));
16
idx = G_malloc(nrows * sizeof(DCELL *));
18
for (row = 0; row < nrows; row++) {
19
idx[row] = &buf[row * ncols];
21
Rast_get_d_row(fd, idx[row], row);
29
void free_cell(DCELL **idx)