PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ gserialized_spgist_choose_2d()

PGDLLEXPORT Datum gserialized_spgist_choose_2d ( PG_FUNCTION_ARGS  )

Definition at line 310 of file gserialized_spgist_2d.c.

References centroid(), getQuadrant4D(), gserialized_spgist_picksplit_2d(), and PG_FUNCTION_INFO_V1().

Referenced by gserialized_spgist_config_2d().

311 {
312  spgChooseIn *in = (spgChooseIn *)PG_GETARG_POINTER(0);
313  spgChooseOut *out = (spgChooseOut *)PG_GETARG_POINTER(1);
314  BOX2DF *centroid = (BOX2DF *)DatumGetPointer(in->prefixDatum), *box = (BOX2DF *)DatumGetPointer(in->leafDatum);
315 
316  out->resultType = spgMatchNode;
317  out->result.matchNode.restDatum = PointerGetDatum(box);
318 
319  /* nodeN will be set by core, when allTheSame. */
320  if (!in->allTheSame)
321  out->result.matchNode.nodeN = getQuadrant4D(centroid, box);
322 
323  PG_RETURN_VOID();
324 }
static uint8 getQuadrant4D(BOX2DF *centroid, BOX2DF *inBox)
Datum centroid(PG_FUNCTION_ARGS)
Here is the call graph for this function:
Here is the caller graph for this function: