PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized_header_size()

static size_t gserialized_header_size ( const GSERIALIZED g)
inlinestatic

Definition at line 278 of file gserialized.c.

279 {
280  size_t sz = 8; /* varsize (4) + srid(3) + flags (1) */
281 
282  if ((GFLAGS_GET_VERSION(g->gflags)) &&
283  (G2FLAG_EXTENDED & g->gflags))
284  sz += 8;
285 
286  if (GFLAG_BBOX & g->gflags)
287  {
288  if (GFLAG_GEODETIC & g->gflags)
289  {
290  sz += 6 * sizeof(float);
291  }
292  else
293  {
294  sz += 4 * sizeof(float) +
295  ((GFLAG_Z & g->gflags) ? 2*sizeof(float) : 0) +
296  ((GFLAG_M & g->gflags) ? 2*sizeof(float) : 0);
297  }
298  }
299 
300  return sz;
301 }
#define GFLAG_GEODETIC
Definition: gserialized.c:9
#define GFLAGS_GET_VERSION(gflags)
Definition: gserialized.c:12
#define GFLAG_Z
Definition: gserialized.c:6
#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:277
#define GFLAG_BBOX
Definition: gserialized.c:8
#define GFLAG_M
Definition: gserialized.c:7
uint8_t gflags
Definition: liblwgeom.h:432

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: