17 #include <grass/gis.h> 38 double N,
double S,
double E,
double W)
40 if (window->north <= S)
42 if (window->south >= N)
45 if (window->proj == PROJECTION_LL) {
46 while (E < window->west) {
50 while (W > window->east) {
56 if (window->east <= W)
58 if (window->west >= E)
84 double N,
double S,
double E,
double W)
91 if ((n = window->north) > N)
93 if ((s = window->south) < S)
98 V = (N < window->north && N > window->south);
107 if (window->proj == PROJECTION_LL) {
109 while (E + shift > window->east)
111 while (E + shift < window->west)
118 if ((e = window->east) > E)
120 if ((w = window->west) < W)
124 H = (E > window->west && E < window->east);
129 if (window->proj == PROJECTION_LL) {
131 while (W + shift < window->west)
133 while (W + shift > window->east)
138 if ((e = window->east) > E)
140 if ((w = window->west) < W)
150 return (H * V) / ((N - S) * (E - W));
double G_window_percentage_overlap(const struct Cell_head *window, double N, double S, double E, double W)
Determines percentage of box is contained in the window.
int G_window_overlap(const struct Cell_head *window, double N, double S, double E, double W)
Determines if a box overlays a map window.