PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwtriangle_to_twkb_buf()

static int lwtriangle_to_twkb_buf ( const LWTRIANGLE tri,
TWKB_GLOBALS globals,
TWKB_STATE ts 
)
static

Definition at line 259 of file lwout_twkb.c.

260 {
261  LWDEBUGF(2, "Entered %s", __func__);
262  bytebuffer_append_uvarint(ts->geom_buf, (uint64_t)1);
263 
264  /* Set the coordinates (do write npoints) */
265  ptarray_to_twkb_buf(tri->points, globals, ts, 1, 2);
266  return 0;
267 }
void bytebuffer_append_uvarint(bytebuffer_t *b, const uint64_t val)
Writes a unsigned varInt to the buffer.
Definition: bytebuffer.c:166
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
static int ptarray_to_twkb_buf(const POINTARRAY *pa, TWKB_GLOBALS *globals, TWKB_STATE *ts, int register_npoints, uint32_t minpoints)
Stores a pointarray as varints in the buffer @register_npoints, controls whether an npoints entry is ...
Definition: lwout_twkb.c:107
POINTARRAY * points
Definition: liblwgeom.h:481
bytebuffer_t * geom_buf
Definition: lwout_twkb.h:89

References bytebuffer_append_uvarint(), TWKB_STATE::geom_buf, LWDEBUGF, LWTRIANGLE::points, and ptarray_to_twkb_buf().

Referenced by lwgeom_to_twkb_buf().

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