496 if ( PG_ARGISNULL(0) ) PG_RETURN_NULL();
498 geom = PG_GETARG_GSERIALIZED_P(0);
501 if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) )
502 relative = PG_GETARG_INT32(1) ? 1:0;
504 if ( PG_NARGS() > 2 && ! PG_ARGISNULL(2) )
506 precision = PG_GETARG_INT32(2);
508 if ( precision > DBL_DIG )
510 else if ( precision < 0 ) precision = 0;
515 result = cstring2text(svg);
518 PG_FREE_IF_COPY(geom, 0);
520 PG_RETURN_TEXT_P(result);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
char * lwgeom_to_svg(const LWGEOM *geom, int precision, int relative)
Takes a GEOMETRY and returns a SVG representation.
void lwgeom_free(LWGEOM *geom)