GRASS 8 Programmer's Manual 8.6.0dev(2026)-55de52a352
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 SPDX-FileCopyrightText: 2001-2009 GRASS Development Team
9 SPDX-License-Identifier: GPL-2.0-or-later
10
11 \author Original author CERL, probably Dave Gerdes or Mike Higgins.
12 \author Update to GRASS 5.7 Radim Blazek and David D. Gray.
13 */
14
15#include <grass/vector.h>
16
17/*!
18 Check if region overlaps with map extent.
19
20 \param Map vector map
21 \param n,s,e,w region bounding box
22
23 \return 1 if regions overlap
24 \return 0 if not
25 */
26int V__map_overlap(struct Map_info *Map, double n, double s, double e, double w)
27{
28 struct Cell_head W;
29
30 /* updated for Lat lon support 21 Jun 91 */
31 W.north = Map->constraint.box.N;
32 W.south = Map->constraint.box.S;
33 W.east = Map->constraint.box.E;
34 W.west = Map->constraint.box.W;
35 W.proj = Map->head.proj;
36
37 return G_window_overlap(&W, n, s, e, w);
38}
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:144
int V__map_overlap(struct Map_info *Map, double n, double s, double e, double w)
Definition overlap.c:26
2D/3D raster map header (used also for region)
Definition gis.h:443
Vector map info.