PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ gbox_contains_point2d()

int gbox_contains_point2d ( const GBOX g,
const POINT2D p 
)

Definition at line 362 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().

363 {
364  if ( ( g->xmin <= p->x ) && ( g->xmax >= p->x ) &&
365  ( g->ymin <= p->y ) && ( g->ymax >= p->y ) )
366  {
367  return LW_TRUE;
368  }
369  return LW_FALSE;
370 }
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: