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

Definition at line 408 of file lwgeom_inout.c.

References geometry_serialize(), lwgeom_add_bbox(), lwgeom_from_gserialized(), and result.

Referenced by cache_bbox().

409 {
410  GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
412  LWGEOM *lwgeom;
413 
414  lwgeom = lwgeom_from_gserialized(geom);
415  lwgeom_add_bbox(lwgeom);
416  result = geometry_serialize(lwgeom);
417 
418  PG_FREE_IF_COPY(geom, 0);
419  PG_RETURN_POINTER(result);
420 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
char ** result
Definition: liblwgeom.h:218
LWGEOM * geom
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
void lwgeom_add_bbox(LWGEOM *lwgeom)
Compute a bbox if not already computed.
Definition: lwgeom.c:555

Here is the call graph for this function:

Here is the caller graph for this function: