PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ BOX2D_overlap()

Datum BOX2D_overlap ( PG_FUNCTION_ARGS  )

Definition at line 182 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().

183 {
184  GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0);
185  GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1);
186  bool result;
187 
188 
189  result = ((FPge(box1->xmax, box2->xmax) &&
190  FPle(box1->xmin, box2->xmax)) ||
191  (FPge(box2->xmax, box1->xmax) &&
192  FPle(box2->xmin, box1->xmax)))
193  &&
194  ((FPge(box1->ymax, box2->ymax) &&
195  FPle(box1->ymin, box2->ymax)) ||
196  (FPge(box2->ymax, box1->ymax) &&
197  FPle(box2->ymin, box1->ymax)));
198 
199  PG_RETURN_BOOL(result);
200 }
double xmax
Definition: liblwgeom.h:295
double ymin
Definition: liblwgeom.h:296
double xmin
Definition: liblwgeom.h:294
double ymax
Definition: liblwgeom.h:297
Here is the call graph for this function:
Here is the caller graph for this function: