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

Definition at line 138 of file geography_btree.c.

References FALSE, geography_gidx_center(), TRUE, POINT3D::x, POINT3D::y, and POINT3D::z.

139 {
140  /* Put aside some stack memory and use it for GIDX pointers. */
141  char gboxmem1[GIDX_MAX_SIZE];
142  char gboxmem2[GIDX_MAX_SIZE];
143  GIDX *gbox1 = (GIDX*)gboxmem1;
144  GIDX *gbox2 = (GIDX*)gboxmem2;
145  POINT3D p1, p2;
146 
147  /* Must be able to build box for each argument (ie, not empty geometry) */
148  if ( ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(0), gbox1) ||
149  ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), gbox2) )
150  {
151  PG_RETURN_BOOL(FALSE);
152  }
153 
154  geography_gidx_center(gbox1, &p1);
155  geography_gidx_center(gbox2, &p2);
156 
157  if ( p1.x >= p2.x && p1.y >= p2.y && p1.z >= p2.z )
158  PG_RETURN_BOOL(TRUE);
159 
160  PG_RETURN_BOOL(FALSE);
161 }
double y
Definition: liblwgeom.h:296
double x
Definition: liblwgeom.h:296
double z
Definition: liblwgeom.h:296
static void geography_gidx_center(GIDX *gidx, POINT3D *p)
#define FALSE
Definition: dbfopen.c:169
#define TRUE
Definition: dbfopen.c:170

Here is the call graph for this function: