GRASS GIS 7 Programmer's Manual  7.0.5(2016)-r00000
wind_in.c
Go to the documentation of this file.
1 
15 #include <grass/gis.h>
16 
26 int G_point_in_region(double easting, double northing)
27 {
28  struct Cell_head window;
29 
30  G_get_window(&window);
31 
32  return G_point_in_window(easting, northing, &window);
33 }
34 
35 
36 
51 int G_point_in_window(double easting, double northing,
52  const struct Cell_head *window)
53 {
54 
55  if (easting > window->east || easting < window->west ||
56  northing > window->north || northing < window->south)
57  return FALSE;
58 
59  return TRUE;
60 }
void G_get_window(struct Cell_head *window)
Get the current region.
Definition: get_window.c:47
#define FALSE
Definition: dbfopen.c:117
int G_point_in_window(double easting, double northing, const struct Cell_head *window)
Returns TRUE if coordinate is within the given map region.
Definition: wind_in.c:51
#define TRUE
Definition: dbfopen.c:118
int G_point_in_region(double easting, double northing)
Returns TRUE if coordinate is within the current region settings.
Definition: wind_in.c:26