PostGIS  2.2.7dev-r@@SVN_REVISION@@
static size_t asgml3_multisurface_size ( const LWMSURFACE sur,
const char *  srs,
int  precision,
int  opts,
const char *  prefix,
const char *  id 
)
static

Definition at line 1825 of file lwout_gml.c.

References asgml3_curvepoly_size(), asgml3_poly_size(), CURVEPOLYTYPE, LWMSURFACE::geoms, LWMSURFACE::ngeoms, POLYGONTYPE, and LWGEOM::type.

Referenced by asgml3_multisurface().

1826 {
1827  size_t prefixlen = strlen(prefix);
1828  size_t size = sizeof( "<MultiSurface></MultiSurface>" ) + 2 * prefixlen;
1829  if (srs) size += strlen(srs) + sizeof(" srsName=..");
1830  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
1831  LWGEOM* subgeom;
1832  int i;
1833 
1834  for( i = 0; i < sur->ngeoms; ++i )
1835  {
1836  subgeom = sur->geoms[i];
1837  if( subgeom->type == POLYGONTYPE )
1838  {
1839  size += asgml3_poly_size( (LWPOLY*)sur->geoms[i], srs, precision, opts, prefix, id );
1840  }
1841  else if( subgeom->type == CURVEPOLYTYPE )
1842  {
1843  size += asgml3_curvepoly_size( (LWCURVEPOLY*)sur->geoms[i], srs, precision, opts, prefix, id );
1844  }
1845  }
1846  return size;
1847 }
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define CURVEPOLYTYPE
Definition: liblwgeom.h:79
static size_t asgml3_poly_size(const LWPOLY *poly, const char *srs, int precision, int opts, const char *prefix, const char *id)
Definition: lwout_gml.c:1001
static size_t asgml3_curvepoly_size(const LWCURVEPOLY *poly, const char *srs, int precision, int opts, const char *prefix, const char *id)
Definition: lwout_gml.c:1198
uint8_t precision
Definition: cu_in_twkb.c:25
int ngeoms
Definition: liblwgeom.h:543
LWGEOM ** geoms
Definition: liblwgeom.h:545
uint8_t type
Definition: liblwgeom.h:380

Here is the call graph for this function:

Here is the caller graph for this function: