PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t asgml3_poly_size ( const LWPOLY poly,
const char *  srs,
int  precision,
int  opts,
const char *  prefix,
const char *  id 
)
static

Definition at line 897 of file lwout_gml.c.

References if(), IS_DIMS, LWPOLY::nrings, pointArray_GMLsize(), and LWPOLY::rings.

Referenced by asgml3_collection_size(), asgml3_multi_size(), asgml3_poly(), and asgml3_psurface_size().

898 {
899  size_t size;
900  size_t prefixlen = strlen(prefix);
901  int i;
902 
903  size = ( sizeof("<PolygonPatch><exterior><LinearRing>///") + (prefixlen*3) ) * 2;
904  size += ( sizeof("<interior><LinearRing>//") + (prefixlen*2) ) * 2 * (poly->nrings - 1);
905  size += ( sizeof("<posList></posList>") + (prefixlen*2) ) * poly->nrings;
906  if (srs) size += strlen(srs) + sizeof(" srsName=..");
907  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
908  if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'") * poly->nrings;
909 
910  for (i=0; i<poly->nrings; i++)
911  size += pointArray_GMLsize(poly->rings[i], precision);
912 
913  return size;
914 }
#define IS_DIMS(x)
Definition: liblwgeom.h:1367
POINTARRAY ** rings
Definition: liblwgeom.h:413
int nrings
Definition: liblwgeom.h:411
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1471
if(!(yy_init))
Definition: lwin_wkt_lex.c:860

Here is the call graph for this function:

Here is the caller graph for this function: