PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ gserialized_from_lwpoint_size()

static size_t gserialized_from_lwpoint_size ( const LWPOINT point)
static

Definition at line 676 of file g_serialized.c.

References LWPOINT::flags, FLAGS_NDIMS, LWDEBUGF, POINTARRAY::npoints, and LWPOINT::point.

Referenced by gserialized_from_any_size().

677 {
678  size_t size = 4; /* Type number. */
679 
680  assert(point);
681 
682  size += 4; /* Number of points (one or zero (empty)). */
683  size += point->point->npoints * FLAGS_NDIMS(point->flags) * sizeof(double);
684 
685  LWDEBUGF(3, "point size = %d", size);
686 
687  return size;
688 }
int npoints
Definition: liblwgeom.h:371
POINTARRAY * point
Definition: liblwgeom.h:411
uint8_t flags
Definition: liblwgeom.h:408
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:152
Here is the caller graph for this function: