PostGIS  2.2.7dev-r@@SVN_REVISION@@
int gbox_contains_2d ( const GBOX g1,
const GBOX g2 
)

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

Definition at line 316 of file g_box.c.

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

Referenced by contains(), containsproperly(), coveredby(), covers(), and ST_ClipByBox2d().

317 {
318  if ( ( g2->xmin < g1->xmin ) || ( g2->xmax > g1->xmax ) ||
319  ( g2->ymin < g1->ymin ) || ( g2->ymax > g1->ymax ) )
320  {
321  return LW_FALSE;
322  }
323  return LW_TRUE;
324 }
double xmax
Definition: liblwgeom.h:277
double ymin
Definition: liblwgeom.h:278
double xmin
Definition: liblwgeom.h:276
#define LW_FALSE
Definition: liblwgeom.h:62
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:61
double ymax
Definition: liblwgeom.h:279

Here is the caller graph for this function: