#include <stdio.h>
#include <math.h>
#include <grass/gis.h>
Go to the source code of this file.
Functions | |
char * | G_align_window (struct Cell_head *window, struct Cell_head *ref) |
align two regions |
char* G_align_window | ( | struct Cell_head * | window, | |
struct Cell_head * | ref | |||
) |
align two regions
Modifies the input window to align to ref region. The resolutions in window are set to match those in ref and the window edges (north, south, east, west) are modified to align with the grid of the ref region. The window may be enlarged if necessary to achieve the alignment. The north is rounded northward, the south southward, the east eastward and the west westward. Lon-lon constraints are taken into consideration to make sure that the north doesn't go above 90 degrees (for lat/lon) or that the east does "wrap" past the west, etc. This routine returns NULL if ok, otherwise it returns an error message (do NOT free this message).
window | ||
ref |
Definition at line 26 of file align_window.c.
References G_adjust_Cell_head(), G_col_to_easting(), G_easting_to_col(), G_northing_to_row(), and G_row_to_northing().