PostGIS  2.2.7dev-r@@SVN_REVISION@@
static size_t asx3d3_psurface_size ( const LWPSURFACE psur,
char *  srs,
int  precision,
int  opts,
const char *  defid 
)
static

need to make space for coordIndex values too including -1 separating each poly

Definition at line 508 of file lwout_x3d.c.

References asx3d3_poly_size(), LWPSURFACE::geoms, LWPSURFACE::ngeoms, and X3D_USE_GEOCOORDS.

Referenced by asx3d3_collection_size(), and asx3d3_psurface().

509 {
510  int i;
511  size_t size;
512  size_t defidlen = strlen(defid);
513 
514  if ( X3D_USE_GEOCOORDS(opts) ) size = sizeof("<IndexedFaceSet convex='false' coordIndex=''><GeoCoordinate geoSystem='\"GD\" \"WE\" \"longitude_first\"' point='' />") + defidlen;
515  else size = sizeof("<IndexedFaceSet convex='false' coordIndex=''><Coordinate point='' />") + defidlen;
516 
517 
518  for (i=0; i<psur->ngeoms; i++)
519  {
520  size += asx3d3_poly_size(psur->geoms[i], 0, precision, opts, defid)*5;
521  }
522 
523  return size;
524 }
static size_t asx3d3_poly_size(const LWPOLY *poly, char *srs, int precision, int opts, const char *defid)
Compute the string space needed for the IndexedFaceSet representation of the polygon.
Definition: lwout_x3d.c:302
LWPOLY ** geoms
Definition: liblwgeom.h:558
#define X3D_USE_GEOCOORDS(x)
Definition: liblwgeom.h:1489
uint8_t precision
Definition: cu_in_twkb.c:25
int ngeoms
Definition: liblwgeom.h:556

Here is the call graph for this function:

Here is the caller graph for this function: