PostGIS  2.2.7dev-r@@SVN_REVISION@@

◆ gbox_overlaps_2d()

int gbox_overlaps_2d ( const GBOX g1,
const GBOX g2 

Return LW_TRUE if the GBOX overlaps on the 2d plane, LW_FALSE otherwise.

Definition at line 300 of file g_box.c.

References GBOX::flags, FLAGS_GET_GEODETIC, LW_FALSE, LW_TRUE, lwerror(), GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.

Referenced by crosses(), disjoint(), geos_intersects(), overlaps(), ST_ClipByBox2d(), and touches().

301 {
303  /* Make sure our boxes are consistent */
305  lwerror("gbox_overlaps: cannot compare geodetic and non-geodetic boxes");
307  /* Check X/Y first */
308  if ( g1->xmax < g2->xmin || g1->ymax < g2->ymin ||
309  g1->xmin > g2->xmax || g1->ymin > g2->ymax )
310  return LW_FALSE;
312  return LW_TRUE;
313 }
#define FLAGS_GET_GEODETIC(flags)
Definition: liblwgeom.h:127
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
uint8_t flags
Definition: liblwgeom.h:275
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
Here is the call graph for this function:
Here is the caller graph for this function: