PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ gserialized_expand()

GSERIALIZED* gserialized_expand ( GSERIALIZED g,
double  distance 
)

Return a GSERIALIZED with an expanded bounding box.

Definition at line 779 of file gserialized_gist_nd.c.

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

Referenced by geography_expand().

780 {
781  char boxmem[GIDX_MAX_SIZE];
782  GIDX *gidx = (GIDX*)boxmem;
783  float fdistance = (float)distance;
784 
785  /* Get our bounding box out of the geography, return right away if
786  input is an EMPTY geometry. */
787  if ( gserialized_get_gidx_p(g, gidx) == LW_FAILURE )
788  {
789  return g;
790  }
791 
792  gidx_expand(gidx, fdistance);
793 
794  return gserialized_set_gidx(g, gidx);
795 }
#define LW_FAILURE
Definition: liblwgeom.h:79
Datum distance(PG_FUNCTION_ARGS)
Here is the call graph for this function:
Here is the caller graph for this function: