PostGIS  3.0.6dev-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 90 of file lwout_twkb.c.

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

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

Referenced by lwgeom_write_to_buffer().

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