PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t lwpoint_to_wkb_size ( const LWPOINT pt,
uint8_t  variant 
)
static

Definition at line 376 of file lwout_wkb.c.

References lwgeom_wkb_needs_srid(), LWPOINT::point, ptarray_to_wkb_size(), WKB_BYTE_SIZE, WKB_INT_SIZE, and WKB_NO_NPOINTS.

Referenced by lwgeom_to_wkb_size().

377 {
378  /* Endian flag + type number */
379  size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE;
380 
381  /* Extended WKB needs space for optional SRID integer */
382  if ( lwgeom_wkb_needs_srid((LWGEOM*)pt, variant) )
383  size += WKB_INT_SIZE;
384 
385  /* Points */
386  size += ptarray_to_wkb_size(pt->point, variant | WKB_NO_NPOINTS);
387  return size;
388 }
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 * point
Definition: liblwgeom.h:367
#define WKB_NO_NPOINTS
Definition: liblwgeom.h:1773

Here is the call graph for this function:

Here is the caller graph for this function: