PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ LWGEOM_summary()

Datum LWGEOM_summary ( PG_FUNCTION_ARGS  )

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

131 {
132  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
133  char *result;
134  text *mytext;
135  LWGEOM *lwgeom;
136 
137  lwgeom = lwgeom_from_gserialized(geom);
138  result = lwgeom_summary(lwgeom, 0);
139  lwgeom_free(lwgeom);
140 
141  /* create a text obj to return */
142  mytext = cstring2text(result);
143  pfree(result);
144 
145  PG_FREE_IF_COPY(geom,0);
146  PG_RETURN_TEXT_P(mytext);
147 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
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: