PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ gserialized_from_lwtriangle_size()

static size_t gserialized_from_lwtriangle_size ( const LWTRIANGLE triangle)
static

Definition at line 433 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

434 {
435  size_t size = 4; /* Type number. */
436 
437  assert(triangle);
438 
439  size += 4; /* Number of points (zero => empty). */
440  size += triangle->points->npoints * FLAGS_NDIMS(triangle->flags) * sizeof(double);
441 
442  LWDEBUGF(3, "triangle size = %d", size);
443 
444  return size;
445 }
POINTARRAY * points
Definition: liblwgeom.h:417
int npoints
Definition: liblwgeom.h:355
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:136
uint8_t flags
Definition: liblwgeom.h:414
Here is the caller graph for this function: