PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ gbox_overlaps_2d()

int gbox_overlaps_2d ( const GBOX g1,
const GBOX g2 
)
extern

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

Definition at line 323 of file gbox.c.

324{
325
326 /* Make sure our boxes are consistent */
328 lwerror("gbox_overlaps: cannot compare geodetic and non-geodetic boxes");
329
330 /* Check X/Y first */
331 if ( g1->xmax < g2->xmin || g1->ymax < g2->ymin ||
332 g1->xmin > g2->xmax || g1->ymin > g2->ymax )
333 return LW_FALSE;
334
335 return LW_TRUE;
336}
#define LW_FALSE
Definition liblwgeom.h:94
#define LW_TRUE
Return types for functions with status returns.
Definition liblwgeom.h:93
#define FLAGS_GET_GEODETIC(flags)
Definition liblwgeom.h:168
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
double ymax
Definition liblwgeom.h:357
double xmax
Definition liblwgeom.h:355
double ymin
Definition liblwgeom.h:356
double xmin
Definition liblwgeom.h:354
lwflags_t flags
Definition liblwgeom.h:353

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

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

Here is the call graph for this function:
Here is the caller graph for this function: