PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ test_gbox_serialized_size()

static void test_gbox_serialized_size ( void  )
static

Definition at line 245 of file liblwgeom/cunit/cu_misc.c.

246{
247 lwflags_t flags = lwflags(0, 0, 0);
248 CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
249 FLAGS_SET_BBOX(flags, 1);
250 CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
251 FLAGS_SET_Z(flags, 1);
252 CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
253 FLAGS_SET_M(flags, 1);
254 CU_ASSERT_EQUAL(gbox_serialized_size(flags),32);
255 FLAGS_SET_GEODETIC(flags, 1);
256 CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
257}
size_t gbox_serialized_size(lwflags_t flags)
Return the number of bytes necessary to hold a GBOX of this dimension in serialized form.
Definition gbox.c:440
uint16_t lwflags_t
Definition liblwgeom.h:313
#define FLAGS_SET_BBOX(flags, value)
Definition liblwgeom.h:188
#define FLAGS_SET_GEODETIC(flags, value)
Definition liblwgeom.h:189
lwflags_t lwflags(int hasz, int hasm, int geodetic)
Construct a new flags bitmask.
Definition lwutil.c:471
#define FLAGS_SET_M(flags, value)
Definition liblwgeom.h:187
#define FLAGS_SET_Z(flags, value)
Definition liblwgeom.h:186

References FLAGS_SET_BBOX, FLAGS_SET_GEODETIC, FLAGS_SET_M, FLAGS_SET_Z, gbox_serialized_size(), and lwflags().

Referenced by misc_suite_setup().

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