PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum BOX2D_overlap ( PG_FUNCTION_ARGS  )

Definition at line 148 of file lwgeom_box.c.

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

149 {
150  GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0);
151  GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1);
152  bool result;
153 
154 
155  result = ((FPge(box1->xmax, box2->xmax) &&
156  FPle(box1->xmin, box2->xmax)) ||
157  (FPge(box2->xmax, box1->xmax) &&
158  FPle(box2->xmin, box1->xmax)))
159  &&
160  ((FPge(box1->ymax, box2->ymax) &&
161  FPle(box1->ymin, box2->ymax)) ||
162  (FPge(box2->ymax, box1->ymax) &&
163  FPle(box2->ymin, box1->ymax)));
164 
165  PG_RETURN_BOOL(result);
166 }
double xmax
Definition: liblwgeom.h:249
char ** result
Definition: liblwgeom.h:218
double ymin
Definition: liblwgeom.h:250
double xmin
Definition: liblwgeom.h:248
double ymax
Definition: liblwgeom.h:251