PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ cu_wkt()

static char* cu_wkt ( char *  wkt,
uint8_t  variant 
)
static

Definition at line 46 of file cu_out_wkt.c.

References free(), LW_PARSER_CHECK_NONE, lwgeom_free(), lwgeom_from_wkt(), lwgeom_to_wkt(), and s.

Referenced by test_wkt_out_circularstring(), test_wkt_out_collection(), test_wkt_out_compoundcurve(), test_wkt_out_curvpolygon(), test_wkt_out_linestring(), test_wkt_out_multicurve(), test_wkt_out_multilinestring(), test_wkt_out_multipoint(), test_wkt_out_multipolygon(), test_wkt_out_multisurface(), test_wkt_out_point(), and test_wkt_out_polygon().

47 {
49  if ( s ) free(s);
50  if ( ! g )
51  {
52  printf("error converting '%s' to lwgeom\n", wkt);
53  exit(0);
54  }
55  s = lwgeom_to_wkt(g, variant, 8, NULL);
56  lwgeom_free(g);
57  return s;
58 }
uint8_t variant
Definition: cu_in_twkb.c:26
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
Definition: lwout_wkt.c:669
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2013
char * s
Definition: cu_out_wkt.c:23
void free(void *)
Here is the call graph for this function:
Here is the caller graph for this function: