PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ gserialized_header_size()

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().

77 {
78  uint32_t sz = 8; /* varsize (4) + srid(3) + flags (1) */
79 
80  if (gserialized_has_bbox(gser))
81  sz += gbox_serialized_size(gser->flags);
82 
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:451
uint8_t flags
Definition: liblwgeom.h:383
Here is the call graph for this function:
Here is the caller graph for this function: