PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ LWGEOM_summary()

Datum LWGEOM_summary ( PG_FUNCTION_ARGS  )

Definition at line 134 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().

135 {
136  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
137  char *result;
138  text *mytext;
139  LWGEOM *lwgeom;
140 
141  lwgeom = lwgeom_from_gserialized(geom);
142  result = lwgeom_summary(lwgeom, 0);
143  lwgeom_free(lwgeom);
144 
145  /* create a text obj to return */
146  mytext = cstring_to_text(result);
147  pfree(result);
148 
149  PG_FREE_IF_COPY(geom,0);
150  PG_RETURN_TEXT_P(mytext);
151 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
LWGEOM * geom
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
Definition: lwgeom_debug.c:158
Here is the call graph for this function:
Here is the caller graph for this function: