PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ gserialized_header_size()

static size_t gserialized_header_size ( const GSERIALIZED g)
inlinestatic

Definition at line 307 of file gserialized.c.

308 {
309  size_t sz = 8; /* varsize (4) + srid(3) + flags (1) */
310 
311  if ((GFLAGS_GET_VERSION(g->gflags)) &&
312  (G2FLAG_EXTENDED & g->gflags))
313  sz += 8;
314 
315  if (GFLAG_BBOX & g->gflags)
316  {
317  if (GFLAG_GEODETIC & g->gflags)
318  {
319  sz += 6 * sizeof(float);
320  }
321  else
322  {
323  sz += 4 * sizeof(float) +
324  ((GFLAG_Z & g->gflags) ? 2*sizeof(float) : 0) +
325  ((GFLAG_M & g->gflags) ? 2*sizeof(float) : 0);
326  }
327  }
328 
329  return sz;
330 }
#define GFLAG_GEODETIC
Definition: gserialized.c:38
#define GFLAGS_GET_VERSION(gflags)
Definition: gserialized.c:41
#define GFLAG_Z
Definition: gserialized.c:35
#define G2FLAG_EXTENDED
Return -1 if g1 is "less than" g2, 1 if g1 is "greater than" g2 and 0 if g1 and g2 are the "same".
Definition: gserialized.c:306
#define GFLAG_BBOX
Definition: gserialized.c:37
#define GFLAG_M
Definition: gserialized.c:36
uint8_t gflags
Definition: liblwgeom.h:446

References G2FLAG_EXTENDED, GFLAG_BBOX, GFLAG_GEODETIC, GFLAG_M, GFLAG_Z, GSERIALIZED::gflags, and GFLAGS_GET_VERSION.

Referenced by gserialized_cmp().

Here is the caller graph for this function: