PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ cu_twkb()

static void cu_twkb ( char *  wkt,
int8_t  prec_xy,
int8_t  prec_z,
int8_t  prec_m,
uint8_t  variant 
)
static

Definition at line 55 of file cu_out_twkb.c.

56 {
58  size_t twkb_size;
59  uint8_t *twkb;
60  if ( ! g ) lwnotice("input wkt is invalid: %s", wkt);
61  twkb = lwgeom_to_twkb(g, variant, prec_xy, prec_z, prec_m, &twkb_size);
62  lwgeom_free(g);
63  if ( s ) free(s);
64  s = hexbytes_from_bytes(twkb, twkb_size);
65  free(twkb);
66 }
static uint8_t variant
Definition: cu_in_twkb.c:26
static char * s
Definition: cu_out_twkb.c:24
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
char * hexbytes_from_bytes(const uint8_t *bytes, size_t size)
Definition: lwout_wkb.c:39
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2005
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
uint8_t * lwgeom_to_twkb(const LWGEOM *geom, uint8_t variant, int8_t precision_xy, int8_t precision_z, int8_t precision_m, size_t *twkb_size)
Definition: lwout_twkb.c:618
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
Definition: lwutil.c:177
void free(void *)
unsigned char uint8_t
Definition: uthash.h:79

References free(), hexbytes_from_bytes(), LW_PARSER_CHECK_NONE, lwgeom_free(), lwgeom_from_wkt(), lwgeom_to_twkb(), lwnotice(), s, and variant.

Referenced by test_twkb_out_collection(), test_twkb_out_linestring(), test_twkb_out_multipoint(), test_twkb_out_multipolygon(), test_twkb_out_point(), and test_twkb_out_polygon().

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