PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ BOX2D_overlap()

Datum BOX2D_overlap ( PG_FUNCTION_ARGS  )

Definition at line 190 of file lwgeom_box.c.

References BOX2D_overleft(), PG_FUNCTION_INFO_V1(), GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.

Referenced by BOX2D_same().

191 {
192  GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0);
193  GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1);
194  bool result;
195 
196 
197  result = ((FPge(box1->xmax, box2->xmax) &&
198  FPle(box1->xmin, box2->xmax)) ||
199  (FPge(box2->xmax, box1->xmax) &&
200  FPle(box2->xmin, box1->xmax)))
201  &&
202  ((FPge(box1->ymax, box2->ymax) &&
203  FPle(box1->ymin, box2->ymax)) ||
204  (FPge(box2->ymax, box1->ymax) &&
205  FPle(box2->ymin, box1->ymax)));
206 
207  PG_RETURN_BOOL(result);
208 }
double xmax
Definition: liblwgeom.h:293
double ymin
Definition: liblwgeom.h:294
double xmin
Definition: liblwgeom.h:292
double ymax
Definition: liblwgeom.h:295
Here is the call graph for this function:
Here is the caller graph for this function: