PostGIS  2.2.7dev-r@@SVN_REVISION@@
lwout_twkb.c File Reference
#include "lwout_twkb.h"
Include dependency graph for lwout_twkb.c:

Go to the source code of this file.

Functions

static uint8_t lwgeom_twkb_type (const LWGEOM *geom)
 
static size_t sizeof_bbox (TWKB_STATE *ts, int ndims)
 Calculates the size of the bbox in varints in the form: xmin, xdelta, ymin, ydelta. More...
 
static void write_bbox (TWKB_STATE *ts, int ndims)
 Writes the bbox in varints in the form: xmin, xdelta, ymin, ydelta. More...
 
static int ptarray_to_twkb_buf (const POINTARRAY *pa, TWKB_GLOBALS *globals, TWKB_STATE *ts, int register_npoints, int minpoints)
 Stores a pointarray as varints in the buffer , controls whether an npoints entry is added to the buffer (used to skip npoints for point types) , states the dimensionality of object this array is part of (0 = point, 1 = linear, 2 = areal) More...
 
static int lwpoint_to_twkb_buf (const LWPOINT *pt, TWKB_GLOBALS *globals, TWKB_STATE *ts)
 
static int lwline_to_twkb_buf (const LWLINE *line, TWKB_GLOBALS *globals, TWKB_STATE *ts)
 
static int lwpoly_to_twkb_buf (const LWPOLY *poly, TWKB_GLOBALS *globals, TWKB_STATE *ts)
 
static int lwmulti_to_twkb_buf (const LWCOLLECTION *col, TWKB_GLOBALS *globals, TWKB_STATE *ts)
 
static int lwcollection_to_twkb_buf (const LWCOLLECTION *col, TWKB_GLOBALS *globals, TWKB_STATE *ts)
 
static int lwgeom_to_twkb_buf (const LWGEOM *geom, TWKB_GLOBALS *globals, TWKB_STATE *ts)
 
static int lwgeom_write_to_buffer (const LWGEOM *geom, TWKB_GLOBALS *globals, TWKB_STATE *parent_state)
 
uint8_t * lwgeom_to_twkb_with_idlist (const LWGEOM *geom, int64_t *idlist, uint8_t variant, int8_t precision_xy, int8_t precision_z, int8_t precision_m, size_t *twkb_size)
 Convert LWGEOM to a char* in TWKB format. More...
 
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)