PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ gserialized_from_lwline_size()

static size_t gserialized_from_lwline_size ( const LWLINE line)
static

Definition at line 687 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

688 {
689  size_t size = 4; /* Type number. */
690 
691  assert(line);
692 
693  size += 4; /* Number of points (zero => empty). */
694  size += line->points->npoints * FLAGS_NDIMS(line->flags) * sizeof(double);
695 
696  LWDEBUGF(3, "linestring size = %d", size);
697 
698  return size;
699 }
uint8_t flags
Definition: liblwgeom.h:421
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:151
POINTARRAY * points
Definition: liblwgeom.h:424
uint32_t npoints
Definition: liblwgeom.h:373
Here is the caller graph for this function: