PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ gserialized_datum_predicate_geom_gidx()

static int gserialized_datum_predicate_geom_gidx ( Datum  gs1,
GIDX *  gidx2,
gidx_predicate  predicate 
)
static

Definition at line 582 of file gserialized_gist_nd.c.

References LW_FALSE, LW_SUCCESS, and LW_TRUE.

Referenced by gserialized_gidx_geom_within().

583 {
584  /* Put aside some stack memory and use it for GIDX pointers. */
585  char boxmem2[GIDX_MAX_SIZE];
586  GIDX *gidx1 = (GIDX*)boxmem2;
587 
588  POSTGIS_DEBUG(3, "entered function");
589 
590  /* Must be able to build box for gs2 arguement (ie, not empty geometry)
591  and predicate function to return true. */
592  if ( (gserialized_datum_get_gidx_p(gs1, gidx1) == LW_SUCCESS) &&
593  predicate(gidx1, gidx2) )
594  {
595  POSTGIS_DEBUGF(3, "got boxes %s and %s", gidx_to_string(gidx1), gidx_to_string(gidx2));
596  return LW_TRUE;
597  }
598  return LW_FALSE;
599 }
#define LW_SUCCESS
Definition: liblwgeom.h:80
#define LW_FALSE
Definition: liblwgeom.h:77
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
Here is the caller graph for this function: