PostGIS  3.0.6dev-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 1818 of file lwout_gml.c.

1819 {
1820  size_t prefixlen = strlen(prefix);
1821  size_t size = sizeof( "<MultiSurface></MultiSurface>" ) + 2 * prefixlen;
1822  if (srs) size += strlen(srs) + sizeof(" srsName=..");
1823  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
1824  LWGEOM* subgeom;
1825  uint32_t i;
1826 
1827  for( i = 0; i < sur->ngeoms; ++i )
1828  {
1829  subgeom = sur->geoms[i];
1830  if( subgeom->type == POLYGONTYPE )
1831  {
1832  size += asgml3_poly_size( (LWPOLY*)sur->geoms[i], srs, precision, opts, prefix, id );
1833  }
1834  else if( subgeom->type == CURVEPOLYTYPE )
1835  {
1836  size += asgml3_curvepoly_size( (LWCURVEPOLY*)sur->geoms[i], srs, precision, opts, prefix, id );
1837  }
1838  }
1839  return size;
1840 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define CURVEPOLYTYPE
Definition: liblwgeom.h:125
#define POLYGONTYPE
Definition: liblwgeom.h:118
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:994
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:1191
opts
Definition: ovdump.py:45
uint8_t type
Definition: liblwgeom.h:448
uint32_t ngeoms
Definition: liblwgeom.h:622
LWGEOM ** geoms
Definition: liblwgeom.h:617

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

Referenced by asgml3_multisurface().

Here is the call graph for this function:
Here is the caller graph for this function: