PostGIS  2.5.0dev-r@@SVN_REVISION@@
int gbox_contains_point2d ( const GBOX g,
const POINT2D p 
)

Definition at line 357 of file g_box.c.

References LW_FALSE, LW_TRUE, POINT2D::x, GBOX::xmax, GBOX::xmin, POINT2D::y, GBOX::ymax, and GBOX::ymin.

Referenced by ptarray_npoints_in_rect().

358 {
359  if ( ( g->xmin <= p->x ) && ( g->xmax >= p->x ) &&
360  ( g->ymin <= p->y ) && ( g->ymax >= p->y ) )
361  {
362  return LW_TRUE;
363  }
364  return LW_FALSE;
365 }
double xmax
Definition: liblwgeom.h:292
double x
Definition: liblwgeom.h:327
double ymin
Definition: liblwgeom.h:293
double xmin
Definition: liblwgeom.h:291
#define LW_FALSE
Definition: liblwgeom.h:76
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:75
double ymax
Definition: liblwgeom.h:294
double y
Definition: liblwgeom.h:327

Here is the caller graph for this function: