PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ LWGEOM_summary()

Datum LWGEOM_summary ( PG_FUNCTION_ARGS  )

Definition at line 115 of file lwgeom_functions_basic.c.

References dumpnode::geom, lwgeom_free(), lwgeom_from_gserialized(), lwgeom_summary(), PG_FUNCTION_INFO_V1(), and postgis_version().

Referenced by LWGEOM_mem_size().

116 {
117  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
118  char *result;
119  text *mytext;
120  LWGEOM *lwgeom;
121 
122  lwgeom = lwgeom_from_gserialized(geom);
123  result = lwgeom_summary(lwgeom, 0);
124  lwgeom_free(lwgeom);
125 
126  /* create a text obj to return */
127  mytext = cstring2text(result);
128  pfree(result);
129 
130  PG_FREE_IF_COPY(geom,0);
131  PG_RETURN_TEXT_P(mytext);
132 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1050
LWGEOM * geom
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
Definition: lwgeom_debug.c:145
Here is the call graph for this function:
Here is the caller graph for this function: