PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ gbox_within_2d()

int gbox_within_2d ( const GBOX g1,
const GBOX g2 
)

Return LW_TRUE if the first GBOX is within the second on the 2d plane, LW_FALSE otherwise.

Definition at line 351 of file gbox.c.

352 {
353  if ( ( g1->xmin < g2->xmin ) || ( g1->xmax > g2->xmax ) ||
354  ( g1->ymin < g2->ymin ) || ( g1->ymax > g2->ymax ) )
355  {
356  return LW_FALSE;
357  }
358  return LW_TRUE;
359 }
#define LW_FALSE
Definition: liblwgeom.h:94
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:93
double ymax
Definition: liblwgeom.h:357
double xmax
Definition: liblwgeom.h:355
double ymin
Definition: liblwgeom.h:356
double xmin
Definition: liblwgeom.h:354

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

Referenced by coveredby(), and within().

Here is the caller graph for this function: