PostGIS  2.5.7dev-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 995 of file lwout_gml.c.

996 {
997  size_t size;
998  size_t prefixlen = strlen(prefix);
999  uint32_t i;
1000 
1001  size = ( sizeof("<PolygonPatch><exterior><LinearRing>///") + (prefixlen*3) ) * 2;
1002  size += ( sizeof("<interior><LinearRing>//") + (prefixlen*2) ) * 2 * (poly->nrings - 1);
1003  size += ( sizeof("<posList></posList>") + (prefixlen*2) ) * poly->nrings;
1004  if (srs) size += strlen(srs) + sizeof(" srsName=..");
1005  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
1006  if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'") * poly->nrings;
1007 
1008  for (i=0; i<poly->nrings; i++)
1009  size += pointArray_GMLsize(poly->rings[i], precision);
1010 
1011  return size;
1012 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define IS_DIMS(x)
Definition: liblwgeom.h:1551
if(!(yy_init))
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1949
opts
Definition: ovdump.py:44
POINTARRAY ** rings
Definition: liblwgeom.h:460
uint32_t nrings
Definition: liblwgeom.h:458
unsigned int uint32_t
Definition: uthash.h:78

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

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

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