PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ gserialized2_from_lwline_size()

static size_t gserialized2_from_lwline_size ( const LWLINE line)
static

Definition at line 655 of file gserialized2.c.

656 {
657  size_t size = 4; /* Type number. */
658 
659  assert(line);
660 
661  size += 4; /* Number of points (zero => empty). */
662  size += line->points->npoints * FLAGS_NDIMS(line->flags) * sizeof(double);
663 
664  LWDEBUGF(3, "linestring size = %d", size);
665 
666  return size;
667 }
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:179
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
lwflags_t flags
Definition: liblwgeom.h:485
POINTARRAY * points
Definition: liblwgeom.h:483
uint32_t npoints
Definition: liblwgeom.h:427

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

Referenced by gserialized2_from_any_size().

Here is the caller graph for this function: