PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gserialized_from_lwtriangle_size()

static size_t gserialized_from_lwtriangle_size ( const LWTRIANGLE triangle)
static

Definition at line 702 of file g_serialized.c.

703 {
704  size_t size = 4; /* Type number. */
705 
706  assert(triangle);
707 
708  size += 4; /* Number of points (zero => empty). */
709  size += triangle->points->npoints * FLAGS_NDIMS(triangle->flags) * sizeof(double);
710 
711  LWDEBUGF(3, "triangle size = %d", size);
712 
713  return size;
714 }
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:152
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
POINTARRAY * points
Definition: liblwgeom.h:436
uint8_t flags
Definition: liblwgeom.h:433
uint32_t npoints
Definition: liblwgeom.h:374

References LWTRIANGLE::flags, FLAGS_NDIMS, LWDEBUGF, POINTARRAY::npoints, and LWTRIANGLE::points.

Referenced by gserialized_from_any_size().

Here is the caller graph for this function: