PostGIS  2.2.7dev-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 1001 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_multisurface_size(), asgml3_poly(), and asgml3_psurface_size().

1002 {
1003  size_t size;
1004  size_t prefixlen = strlen(prefix);
1005  int i;
1006 
1007  size = ( sizeof("<PolygonPatch><exterior><LinearRing>///") + (prefixlen*3) ) * 2;
1008  size += ( sizeof("<interior><LinearRing>//") + (prefixlen*2) ) * 2 * (poly->nrings - 1);
1009  size += ( sizeof("<posList></posList>") + (prefixlen*2) ) * poly->nrings;
1010  if (srs) size += strlen(srs) + sizeof(" srsName=..");
1011  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
1012  if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'") * poly->nrings;
1013 
1014  for (i=0; i<poly->nrings; i++)
1015  size += pointArray_GMLsize(poly->rings[i], precision);
1016 
1017  return size;
1018 }
#define IS_DIMS(x)
Definition: liblwgeom.h:1478
POINTARRAY ** rings
Definition: liblwgeom.h:441
uint8_t precision
Definition: cu_in_twkb.c:25
int nrings
Definition: liblwgeom.h:439
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1974
if(!(yy_init))
Definition: lwin_wkt_lex.c:863

Here is the call graph for this function:

Here is the caller graph for this function: