PostGIS 3.7.0dev-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}
LWGEOM * lwgeom_grid(const LWGEOM *lwgeom, gridspec *grid)
Definition lwgeom.c:2421
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
Definition lwout_wkt.c:708
#define WKT_ISO
Definition liblwgeom.h:2219
double ysize
Definition liblwgeom.h:1406
double xsize
Definition liblwgeom.h:1405
Snap-to-grid.
Definition liblwgeom.h:1400

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: