PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ BOX2D_overlap()

Datum BOX2D_overlap ( PG_FUNCTION_ARGS  )

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

169 {
170  GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0);
171  GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1);
172  bool result;
173 
174 
175  result = ((FPge(box1->xmax, box2->xmax) &&
176  FPle(box1->xmin, box2->xmax)) ||
177  (FPge(box2->xmax, box1->xmax) &&
178  FPle(box2->xmin, box1->xmax)))
179  &&
180  ((FPge(box1->ymax, box2->ymax) &&
181  FPle(box1->ymin, box2->ymax)) ||
182  (FPge(box2->ymax, box1->ymax) &&
183  FPle(box2->ymin, box1->ymax)));
184 
185  PG_RETURN_BOOL(result);
186 }
double xmax
Definition: liblwgeom.h:277
double ymin
Definition: liblwgeom.h:278
double xmin
Definition: liblwgeom.h:276
double ymax
Definition: liblwgeom.h:279
Here is the call graph for this function:
Here is the caller graph for this function: