17 #include <grass/gis.h>
34 struct Cell_head *dst,
int rows,
int cols)
38 G_copy((
char *)dst, (
char *)src,
sizeof(*dst));
41 ns = (src->ns_res * src->rows) / rows;
42 ew = (src->ew_res * src->cols) / cols;
54 dst->rows = (dst->north - dst->south) / dst->ns_res;
55 dst->cols = (dst->east - dst->west) / dst->ew_res;
int G_copy(void *a, const void *b, int n)
Copies n bytes starting at address b into address a.
int G_adjust_window_to_box(const struct Cell_head *src, struct Cell_head *dst, int rows, int cols)
Adjusts window to a rectangular box.