828 int dbl_dig_for_wkt = DBL_DIG;
830 POSTGIS_DEBUG(2,
"Called.");
832 geom = PG_GETARG_GSERIALIZED_P(0);
835 if (PG_NARGS() > 1) dbl_dig_for_wkt = PG_GETARG_INT32(1);
840 POSTGIS_DEBUGF(3,
"WKT size = %u, WKT length = %u", (
unsigned int)wkt_size, (
unsigned int)strlen(wkt));
843 result = cstring_to_text(wkt);
847 PG_FREE_IF_COPY(geom, 0);
848 PG_RETURN_TEXT_P(result);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.