867 int dbl_dig_for_wkt = DBL_DIG;
869 POSTGIS_DEBUG(2,
"Called.");
871 geom = PG_GETARG_GSERIALIZED_P(0);
874 if (PG_NARGS() > 1) dbl_dig_for_wkt = PG_GETARG_INT32(1);
879 POSTGIS_DEBUGF(3,
"WKT size = %u, WKT length = %u", (
unsigned int)wkt_size, (
unsigned int)strlen(wkt));
882 result = cstring_to_text(wkt);
886 PG_FREE_IF_COPY(geom, 0);
887 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.