PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ write_bbox()

static void write_bbox ( TWKB_STATE ts,
int  ndims 
)
static

Writes the bbox in varints in the form: xmin, xdelta, ymin, ydelta.

Definition at line 75 of file lwout_twkb.c.

References TWKB_STATE::bbox_max, TWKB_STATE::bbox_min, bytebuffer_append_varint(), TWKB_STATE::header_buf, and LWDEBUGF.

Referenced by lwgeom_write_to_buffer().

76 {
77  int i;
78  LWDEBUGF(2, "Entered %s", __func__);
79  for ( i = 0; i < ndims; i++ )
80  {
82  bytebuffer_append_varint(ts->header_buf, (ts->bbox_max[i] - ts->bbox_min[i]));
83  }
84 }
bytebuffer_t * header_buf
Definition: lwout_twkb.h:64
int64_t bbox_max[MAX_N_DIMS]
Definition: lwout_twkb.h:70
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55
void bytebuffer_append_varint(bytebuffer_t *b, const int64_t val)
Writes a signed varInt to the buffer.
Definition: bytebuffer.c:199
int64_t bbox_min[MAX_N_DIMS]
Definition: lwout_twkb.h:69
Here is the call graph for this function:
Here is the caller graph for this function: