PostGIS  2.5.0dev-r@@SVN_REVISION@@
uint32_t gserialized_header_size ( const GSERIALIZED gser)

Returns the size in bytes of the header, from the start of the object up to the type number.

Definition at line 76 of file g_serialized.c.

References GSERIALIZED::flags, gbox_serialized_size(), and gserialized_has_bbox().

Referenced by gserialized_cmp(), and lwgeom_hash().

77 {
78  uint32_t sz = 8; /* varsize (4) + srid(3) + flags (1) */
80  if (gserialized_has_bbox(gser))
81  sz += gbox_serialized_size(gser->flags);
83  return sz;
84 }
int gserialized_has_bbox(const GSERIALIZED *gser)
Check if a GSERIALIZED has a bounding box without deserializing first.
Definition: g_serialized.c:40
unsigned int uint32_t
Definition: uthash.h:78
size_t gbox_serialized_size(uint8_t flags)
Return the number of bytes necessary to hold a GBOX of this dimension in serialized form...
Definition: g_box.c:446
uint8_t flags
Definition: liblwgeom.h:382

Here is the call graph for this function:

Here is the caller graph for this function: