PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ gbox_contains_point3d()

int gbox_contains_point3d ( const GBOX gbox,
const POINT3D pt 
)

Return true if the point is inside the gbox.

Definition at line 254 of file g_box.c.

References LW_FALSE, LW_TRUE, POINT3D::x, GBOX::xmax, GBOX::xmin, POINT3D::y, GBOX::ymax, GBOX::ymin, POINT3D::z, GBOX::zmax, and GBOX::zmin.

Referenced by CircTreePIP(), gbox_pt_outside(), and lwpoly_covers_point2d().

255 {
256  if ( gbox->xmin > pt->x || gbox->ymin > pt->y || gbox->zmin > pt->z ||
257  gbox->xmax < pt->x || gbox->ymax < pt->y || gbox->zmax < pt->z )
258  {
259  return LW_FALSE;
260  }
261  return LW_TRUE;
262 }
double y
Definition: liblwgeom.h:342
double xmax
Definition: liblwgeom.h:295
double x
Definition: liblwgeom.h:342
double z
Definition: liblwgeom.h:342
double zmax
Definition: liblwgeom.h:299
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 zmin
Definition: liblwgeom.h:298
Here is the caller graph for this function: