PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ gserialized_from_lwtriangle_size()

static size_t gserialized_from_lwtriangle_size ( const LWTRIANGLE triangle)
static

Definition at line 701 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

702 {
703  size_t size = 4; /* Type number. */
704 
705  assert(triangle);
706 
707  size += 4; /* Number of points (zero => empty). */
708  size += triangle->points->npoints * FLAGS_NDIMS(triangle->flags) * sizeof(double);
709 
710  LWDEBUGF(3, "triangle size = %d", size);
711 
712  return size;
713 }
POINTARRAY * points
Definition: liblwgeom.h:435
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:151
uint8_t flags
Definition: liblwgeom.h:432
uint32_t npoints
Definition: liblwgeom.h:373
Here is the caller graph for this function: