PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ LWGEOM_summary()

Datum LWGEOM_summary ( PG_FUNCTION_ARGS  )

Definition at line 134 of file lwgeom_functions_basic.c.

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
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
Definition: lwgeom_debug.c:158

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

Here is the call graph for this function: