PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ gbox_contains_point2d()

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:295
double x
Definition: liblwgeom.h:330
double ymin
Definition: liblwgeom.h:296
double xmin
Definition: liblwgeom.h:294
#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:297
double y
Definition: liblwgeom.h:330
Here is the caller graph for this function: