PostGIS  2.4.9dev-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:293
double x
Definition: liblwgeom.h:328
double ymin
Definition: liblwgeom.h:294
double xmin
Definition: liblwgeom.h:292
#define LW_FALSE
Definition: liblwgeom.h:77
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
double ymax
Definition: liblwgeom.h:295
double y
Definition: liblwgeom.h:328
Here is the caller graph for this function: