PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ gbox_contains_2d()

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 339 of file gbox.c.

340 {
341  if ( ( g2->xmin < g1->xmin ) || ( g2->xmax > g1->xmax ) ||
342  ( g2->ymin < g1->ymin ) || ( g2->ymax > g1->ymax ) )
343  {
344  return LW_FALSE;
345  }
346  return LW_TRUE;
347 }
#define LW_FALSE
Definition: liblwgeom.h:109
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:108
double ymax
Definition: liblwgeom.h:372
double xmax
Definition: liblwgeom.h:370
double ymin
Definition: liblwgeom.h:371
double xmin
Definition: liblwgeom.h:369

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

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

Here is the caller graph for this function: