142 size_t result_sz = strlen(lwresult) + 8;
146 result =
lwalloc(result_sz + 2);
147 snprintf(result, result_sz,
"0:%s", lwresult);
152 snprintf(result, result_sz,
"%s", lwresult);
158 summary = cstring_to_text(result);
161 PG_FREE_IF_COPY(g, 0);
162 PG_RETURN_TEXT_P(summary);
uint32_t gserialized_get_version(const GSERIALIZED *g)
Return the serialization version.
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
void * lwalloc(size_t size)