PostGIS  2.3.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 529 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().

530 {
531  int i;
532  size_t size;
533  size_t defidlen = strlen(defid);
534 
535  if ( X3D_USE_GEOCOORDS(opts) ) size = sizeof("<IndexedFaceSet convex='false' coordIndex=''><GeoCoordinate geoSystem='\"GD\" \"WE\" \"longitude_first\"' point='' />") + defidlen;
536  else size = sizeof("<IndexedFaceSet convex='false' coordIndex=''><Coordinate point='' />") + defidlen;
537 
538 
539  for (i=0; i<psur->ngeoms; i++)
540  {
541  size += asx3d3_poly_size(psur->geoms[i], 0, precision, opts, defid)*5;
542  }
543 
544  return size;
545 }
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:323
LWPOLY ** geoms
Definition: liblwgeom.h:573
#define X3D_USE_GEOCOORDS(x)
Definition: liblwgeom.h:1533
uint8_t precision
Definition: cu_in_twkb.c:25
int ngeoms
Definition: liblwgeom.h:571

Here is the call graph for this function:

Here is the caller graph for this function: