PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ BOX2D_overlap()

Datum BOX2D_overlap ( PG_FUNCTION_ARGS  )

Definition at line 190 of file lwgeom_box.c.

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 ymax
Definition: liblwgeom.h:298
double xmax
Definition: liblwgeom.h:296
double ymin
Definition: liblwgeom.h:297
double xmin
Definition: liblwgeom.h:295

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