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

Definition at line 421 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

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

Here is the caller graph for this function: