PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ LWGEOM_asSVG()

Datum LWGEOM_asSVG ( PG_FUNCTION_ARGS  )

Definition at line 308 of file lwgeom_export.c.

309{
310 GSERIALIZED *geom;
311 LWGEOM *lwgeom;
312 int relative = 0;
314
315 if ( PG_ARGISNULL(0) ) PG_RETURN_NULL();
316
317 geom = PG_GETARG_GSERIALIZED_P(0);
318
319 /* check for relative path notation */
320 if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) )
321 relative = PG_GETARG_INT32(1) ? 1:0;
322
323 if ( PG_NARGS() > 2 && ! PG_ARGISNULL(2) )
324 {
325 precision = PG_GETARG_INT32(2);
326 }
327
328 lwgeom = lwgeom_from_gserialized(geom);
329 PG_RETURN_TEXT_P(lwgeom_to_svg(lwgeom, precision, relative));
330}
static uint8_t precision
Definition cu_in_twkb.c:25
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
lwvarlena_t * lwgeom_to_svg(const LWGEOM *geom, int precision, int relative)
Takes a GEOMETRY and returns a SVG representation.
Definition lwout_svg.c:559
#define OUT_DEFAULT_DECIMAL_DIGITS

References lwgeom_from_gserialized(), lwgeom_to_svg(), OUT_DEFAULT_DECIMAL_DIGITS, and precision.

Here is the call graph for this function: