GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
wind_in.c File Reference

Point in region functions. More...

#include <grass/gis.h>
Include dependency graph for wind_in.c:

Go to the source code of this file.

Functions

int G_point_in_region (double easting, double northing)
 Returns TRUE if coordinate is within the current region settings. More...
 
int G_point_in_window (double easting, double northing, const struct Cell_head *window)
 Returns TRUE if coordinate is within the given map region. More...
 

Detailed Description

Point in region functions.

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Hamish Bowman. (c) Hamish Bowman, and the GRASS Development Team
Date
February 2007

Definition in file wind_in.c.

Function Documentation

◆ G_point_in_region()

int G_point_in_region ( double  easting,
double  northing 
)

Returns TRUE if coordinate is within the current region settings.

Parameters
easting
northing
Returns
int

Definition at line 26 of file wind_in.c.

References G_get_window(), and G_point_in_window().

◆ G_point_in_window()

int G_point_in_window ( double  easting,
double  northing,
const struct Cell_head window 
)

Returns TRUE if coordinate is within the given map region.

Use instead of G_point_in_region() when used in a loop (it's more efficient to only fetch the window once) or for checking if a point is in another region (e.g. contained with a raster map's bounds).

Parameters
easting
northing
window
Returns
int

Definition at line 51 of file wind_in.c.

Referenced by G_point_in_region().