PostGIS  3.1.6dev-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 1004 of file lwout_gml.c.

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

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: