PostGIS  2.5.7dev-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.

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 }
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
int gserialized_has_bbox(const GSERIALIZED *gser)
Check if a GSERIALIZED has a bounding box without deserializing first.
Definition: g_serialized.c:40
uint8_t flags
Definition: liblwgeom.h:386
unsigned int uint32_t
Definition: uthash.h:78

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

Referenced by gserialized_cmp(), and lwgeom_hash().

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