PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t lwtriangle_to_wkb_size ( const LWTRIANGLE tri,
uint8_t  variant 
)
static

Definition at line 445 of file lwout_wkb.c.

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

Referenced by lwgeom_to_wkb_size().

446 {
447  /* endian flag + type number + number of rings */
448  size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE + WKB_INT_SIZE;
449 
450  /* Extended WKB needs space for optional SRID integer */
451  if ( lwgeom_wkb_needs_srid((LWGEOM*)tri, variant) )
452  size += WKB_INT_SIZE;
453 
454  /* How big is this point array? */
455  size += ptarray_to_wkb_size(tri->points, variant);
456 
457  return size;
458 }
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
POINTARRAY * points
Definition: liblwgeom.h:389
static size_t ptarray_to_wkb_size(const POINTARRAY *pa, uint8_t variant)
Definition: lwout_wkb.c:314

Here is the call graph for this function:

Here is the caller graph for this function: