PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ gserialized_expand()

GSERIALIZED* gserialized_expand ( GSERIALIZED g,
double  distance 
)

Return a GSERIALIZED with an expanded bounding box.

Definition at line 640 of file gserialized_gist_nd.c.

References gserialized_distance_nd(), LW_FAILURE, and PG_FUNCTION_INFO_V1().

Referenced by geography_expand().

641 {
642  char boxmem[GIDX_MAX_SIZE];
643  GIDX *gidx = (GIDX*)boxmem;
644  float fdistance = (float)distance;
645 
646  /* Get our bounding box out of the geography, return right away if
647  input is an EMPTY geometry. */
648  if ( gserialized_get_gidx_p(g, gidx) == LW_FAILURE )
649  {
650  return g;
651  }
652 
653  gidx_expand(gidx, fdistance);
654 
655  return gserialized_set_gidx(g, gidx);
656 }
#define LW_FAILURE
Definition: liblwgeom.h:64
Datum distance(PG_FUNCTION_ARGS)
Here is the call graph for this function:
Here is the caller graph for this function: