PostGIS  2.2.7dev-r@@SVN_REVISION@@
static size_t asx3d3_poly_size ( const LWPOLY poly,
char *  srs,
int  precision,
int  opts,
const char *  defid 
)
static

Compute the string space needed for the IndexedFaceSet representation of the polygon.

Definition at line 302 of file lwout_x3d.c.

References LWPOLY::nrings, pointArray_X3Dsize(), and LWPOLY::rings.

Referenced by asx3d3_collection_size(), asx3d3_multi_size(), and asx3d3_psurface_size().

303 {
304  size_t size;
305  size_t defidlen = strlen(defid);
306  int i;
307 
308  size = ( sizeof("<IndexedFaceSet></IndexedFaceSet>") + (defidlen*3) ) * 2 + 6 * (poly->nrings - 1);
309 
310  for (i=0; i<poly->nrings; i++)
311  size += pointArray_X3Dsize(poly->rings[i], precision);
312 
313  return size;
314 }
static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
Definition: lwout_x3d.c:909
POINTARRAY ** rings
Definition: liblwgeom.h:441
uint8_t precision
Definition: cu_in_twkb.c:25
int nrings
Definition: liblwgeom.h:439

Here is the call graph for this function:

Here is the caller graph for this function: