PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ gserialized_from_lwtriangle_size()

static size_t gserialized_from_lwtriangle_size ( const LWTRIANGLE triangle)
static

Definition at line 460 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

461 {
462  size_t size = 4; /* Type number. */
463 
464  assert(triangle);
465 
466  size += 4; /* Number of points (zero => empty). */
467  size += triangle->points->npoints * FLAGS_NDIMS(triangle->flags) * sizeof(double);
468 
469  LWDEBUGF(3, "triangle size = %d", size);
470 
471  return size;
472 }
POINTARRAY * points
Definition: liblwgeom.h:432
int npoints
Definition: liblwgeom.h:370
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:151
uint8_t flags
Definition: liblwgeom.h:429
Here is the caller graph for this function: