PostGIS  2.4.9dev-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 89 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().

90 {
91  int i;
92  LWDEBUGF(2, "Entered %s", __func__);
93  for ( i = 0; i < ndims; i++ )
94  {
96  bytebuffer_append_varint(ts->header_buf, (ts->bbox_max[i] - ts->bbox_min[i]));
97  }
98 }
bytebuffer_t * header_buf
Definition: lwout_twkb.h:88
int64_t bbox_max[MAX_N_DIMS]
Definition: lwout_twkb.h:94
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
void bytebuffer_append_varint(bytebuffer_t *b, const int64_t val)
Writes a signed varInt to the buffer.
Definition: bytebuffer.c:239
int64_t bbox_min[MAX_N_DIMS]
Definition: lwout_twkb.h:93
Here is the call graph for this function:
Here is the caller graph for this function: