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

Definition at line 114 of file lwgeom_functions_basic.c.

References lwgeom_free(), lwgeom_from_gserialized(), lwgeom_summary(), and result.

115 {
116  GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
117  char *result;
118  text *mytext;
119  LWGEOM *lwgeom;
120 
121  lwgeom = lwgeom_from_gserialized(geom);
122  result = lwgeom_summary(lwgeom, 0);
123  lwgeom_free(lwgeom);
124 
125  /* create a text obj to return */
126  mytext = cstring2text(result);
127  pfree(result);
128 
129  PG_FREE_IF_COPY(geom,0);
130  PG_RETURN_TEXT_P(mytext);
131 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1006
char ** result
Definition: liblwgeom.h:218
LWGEOM * geom
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
Definition: lwgeom_debug.c:145

Here is the call graph for this function: