GRASS GIS 8 Programmer's Manual
8.2.2dev(2023)3d37ee165c

GIS Library  Window overlap functions. More...
#include <grass/gis.h>
Go to the source code of this file.
Functions  
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. More...  
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. More...  
GIS Library  Window overlap functions.
(C) 20012014 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file wind_overlap.c.
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.
Given a map window, and a box of N,S,E,W does the box overlap the map window?
Note: knows about global wraparound for latlong.
[in]  window  pointer to window structure 
[in]  N  north 
[in]  S  south 
[in]  E  east 
[in]  W  west 
Definition at line 37 of file wind_overlap.c.
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.
This version returns the percentage (from 0 to 1) of the box contained in the window. This feature can be used during vector plotting to decide if it is more efficient to do a levelone read of the whole vector map, or to pay the price of a leveltwo startup so only those arcs that enter the window are actually read.
[in]  window  pointer to widnow structure 
[in]  N  north 
[in]  S  south 
[in]  E  east 
[in]  W  west 
Definition at line 83 of file wind_overlap.c.