GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
Loading...
Searching...
No Matches
overlap.c
Go to the documentation of this file.
1/*!
2 \file lib/vector/Vlib/overlap.c
3
4 \brief Vector library - region/window overlap
5
6 Higher level functions for reading/writing/manipulating vectors.
7
8 (C) 2001-2009 by the GRASS Development Team
9
10 This program is free software under the GNU General Public License
11 (>=v2). Read the file COPYING that comes with GRASS for details.
12
13 \author Original author CERL, probably Dave Gerdes or Mike Higgins.
14 \author Update to GRASS 5.7 Radim Blazek and David D. Gray.
15 */
16
17#include <grass/vector.h>
18
19/*!
20 Check if region overlaps with map extent.
21
22 \param Map vector map
23 \param n,s,e,w region bounding box
24
25 \return 1 if regions overlap
26 \return 0 if not
27 */
28int V__map_overlap(struct Map_info *Map, double n, double s, double e, double w)
29{
30 struct Cell_head W;
31
32 /* updated for Lat lon support 21 Jun 91 */
33 W.north = Map->constraint.box.N;
34 W.south = Map->constraint.box.S;
35 W.east = Map->constraint.box.E;
36 W.west = Map->constraint.box.W;
37 W.proj = Map->head.proj;
38
39 return G_window_overlap(&W, n, s, e, w);
40}
int G_window_overlap(const struct Cell_head *, double, double, double, double)
Determines if a box overlays a map window.
#define W
Definition ogsf.h:143
int V__map_overlap(struct Map_info *Map, double n, double s, double e, double w)
Definition overlap.c:28
2D/3D raster map header (used also for region)
Definition gis.h:446
Vector map info.