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

◆ lwgeom_to_text()

static char * lwgeom_to_text ( const LWGEOM geom,
int  prec 
)
static

Definition at line 34 of file cu_lwstroke.c.

35{
36 gridspec grid;
37 LWGEOM *gridded;
38 char *wkt;
39
40 memset(&grid, 0, sizeof(gridspec));
41 grid.xsize = prec;
42 grid.ysize = prec;
43 gridded = lwgeom_grid(geom, &grid);
44
45 wkt = lwgeom_to_wkt(gridded, WKT_ISO, 15, NULL);
46 lwgeom_free(gridded);
47 return wkt;
48}
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1138
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
Definition lwout_wkt.c:676
LWGEOM * lwgeom_grid(const LWGEOM *lwgeom, const gridspec *grid)
Definition lwgeom.c:2245
#define WKT_ISO
Definition liblwgeom.h:2130
double ysize
Definition liblwgeom.h:1347
double xsize
Definition liblwgeom.h:1346
Snap-to-grid.
Definition liblwgeom.h:1341

References lwgeom_free(), lwgeom_grid(), lwgeom_to_wkt(), WKT_ISO, gridspec_t::xsize, and gridspec_t::ysize.

Referenced by test_lwcurve_linearize().

Here is the call graph for this function:
Here is the caller graph for this function: