PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t gserialized_from_lwtriangle_size ( const LWTRIANGLE triangle)
static

Definition at line 435 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

436 {
437  size_t size = 4; /* Type number. */
438 
439  assert(triangle);
440 
441  size += 4; /* Number of points (zero => empty). */
442  size += triangle->points->npoints * FLAGS_NDIMS(triangle->flags) * sizeof(double);
443 
444  LWDEBUGF(3, "triangle size = %d", size);
445 
446  return size;
447 }
POINTARRAY * points
Definition: liblwgeom.h:389
int npoints
Definition: liblwgeom.h:327
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:118
uint8_t flags
Definition: liblwgeom.h:386

Here is the caller graph for this function: