330 static const char *default_prefix =
"";
332 const char *prefix = default_prefix;
335 text *prefix_text = PG_GETARG_TEXT_P(2);
342 if (VARSIZE_ANY_EXHDR(prefix_text) > 0)
345 prefixbuf = palloc(VARSIZE_ANY_EXHDR(prefix_text)+2);
346 memcpy(prefixbuf, VARDATA(prefix_text),
347 VARSIZE_ANY_EXHDR(prefix_text));
349 prefixbuf[VARSIZE_ANY_EXHDR(prefix_text)] =
':';
350 prefixbuf[VARSIZE_ANY_EXHDR(prefix_text)+1] =
'\0';
360 PG_RETURN_TEXT_P(kml);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
lwvarlena_t * lwgeom_to_kml2(const LWGEOM *geom, int precision, const char *prefix)