PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t lwline_to_wkb_size ( const LWLINE line,
uint8_t  variant 
)
static

Definition at line 414 of file lwout_wkb.c.

References lwgeom_wkb_needs_srid(), LWLINE::points, ptarray_to_wkb_size(), WKB_BYTE_SIZE, and WKB_INT_SIZE.

Referenced by lwgeom_to_wkb_size().

415 {
416  /* Endian flag + type number */
417  size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE;
418 
419  /* Extended WKB needs space for optional SRID integer */
420  if ( lwgeom_wkb_needs_srid((LWGEOM*)line, variant) )
421  size += WKB_INT_SIZE;
422 
423  /* Size of point array */
424  size += ptarray_to_wkb_size(line->points, variant);
425  return size;
426 }
static int lwgeom_wkb_needs_srid(const LWGEOM *geom, uint8_t variant)
Definition: lwout_wkb.c:47
#define WKB_INT_SIZE
#define WKB_BYTE_SIZE
static size_t ptarray_to_wkb_size(const POINTARRAY *pa, uint8_t variant)
Definition: lwout_wkb.c:314
POINTARRAY * points
Definition: liblwgeom.h:378

Here is the call graph for this function:

Here is the caller graph for this function: