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)
 
  101     if (window->proj == PROJECTION_LL) {
 
  103         while (E + shift > window->east)
 
  105         while (E + shift < window->west)
 
  112     if ((e = window->east) > E)
 
  114     if ((w = window->west) < W)
 
  121     if (window->proj == PROJECTION_LL) {
 
  123         while (W + shift < window->west)
 
  125         while (W + shift > window->east)
 
  130             if ((e = window->east) > E)
 
  132             if ((w = window->west) < W)
 
  138     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)
Determins if a box overlays a map window.