PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ asgml3_multisurface_size()

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 1838 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().

1839 {
1840  size_t prefixlen = strlen(prefix);
1841  size_t size = sizeof( "<MultiSurface></MultiSurface>" ) + 2 * prefixlen;
1842  if (srs) size += strlen(srs) + sizeof(" srsName=..");
1843  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
1844  LWGEOM* subgeom;
1845  int i;
1846 
1847  for( i = 0; i < sur->ngeoms; ++i )
1848  {
1849  subgeom = sur->geoms[i];
1850  if( subgeom->type == POLYGONTYPE )
1851  {
1852  size += asgml3_poly_size( (LWPOLY*)sur->geoms[i], srs, precision, opts, prefix, id );
1853  }
1854  else if( subgeom->type == CURVEPOLYTYPE )
1855  {
1856  size += asgml3_curvepoly_size( (LWCURVEPOLY*)sur->geoms[i], srs, precision, opts, prefix, id );
1857  }
1858  }
1859  return size;
1860 }
#define POLYGONTYPE
Definition: liblwgeom.h:86
#define CURVEPOLYTYPE
Definition: liblwgeom.h:93
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:1014
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:1211
uint8_t precision
Definition: cu_in_twkb.c:25
int ngeoms
Definition: liblwgeom.h:558
LWGEOM ** geoms
Definition: liblwgeom.h:560
uint8_t type
Definition: liblwgeom.h:395
opts
Definition: ovdump.py:44
Here is the call graph for this function:
Here is the caller graph for this function: