PostGIS  2.2.7dev-r@@SVN_REVISION@@
static size_t gserialized_from_lwline_size ( const LWLINE line)
static

Definition at line 419 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

420 {
421  size_t size = 4; /* Type number. */
422 
423  assert(line);
424 
425  size += 4; /* Number of points (zero => empty). */
426  size += line->points->npoints * FLAGS_NDIMS(line->flags) * sizeof(double);
427 
428  LWDEBUGF(3, "linestring size = %d", size);
429 
430  return size;
431 }
int npoints
Definition: liblwgeom.h:355
uint8_t flags
Definition: liblwgeom.h:403
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:136
POINTARRAY * points
Definition: liblwgeom.h:406

Here is the caller graph for this function: