PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ asgml3_poly_size()

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

1015 {
1016  size_t size;
1017  size_t prefixlen = strlen(prefix);
1018  int i;
1019 
1020  size = ( sizeof("<PolygonPatch><exterior><LinearRing>///") + (prefixlen*3) ) * 2;
1021  size += ( sizeof("<interior><LinearRing>//") + (prefixlen*2) ) * 2 * (poly->nrings - 1);
1022  size += ( sizeof("<posList></posList>") + (prefixlen*2) ) * poly->nrings;
1023  if (srs) size += strlen(srs) + sizeof(" srsName=..");
1024  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
1025  if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'") * poly->nrings;
1026 
1027  for (i=0; i<poly->nrings; i++)
1028  size += pointArray_GMLsize(poly->rings[i], precision);
1029 
1030  return size;
1031 }
#define IS_DIMS(x)
Definition: liblwgeom.h:1544
POINTARRAY ** rings
Definition: liblwgeom.h:457
uint8_t precision
Definition: cu_in_twkb.c:25
int nrings
Definition: liblwgeom.h:455
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1987
opts
Definition: ovdump.py:44
if(!(yy_init))
Here is the call graph for this function:
Here is the caller graph for this function: