PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ asgml2_poly_size()

static size_t asgml2_poly_size ( const LWPOLY poly,
const char *  srs,
int  precision,
const char *  prefix 
)
static

Definition at line 362 of file lwout_gml.c.

363 {
364  size_t size;
365  uint32_t i;
366  size_t prefixlen = strlen(prefix);
367 
368  size = sizeof("<polygon></polygon>") + prefixlen*2;
369  if ( srs ) size += strlen(srs) + sizeof(" srsName=..");
370  if ( lwpoly_is_empty(poly) )
371  return size;
372  size += ( sizeof("<outerboundaryis><linearring><coordinates>/") + ( prefixlen*3) ) * 2;
373  size += ( sizeof("<innerboundaryis><linearring><coordinates>/") + ( prefixlen*2) ) * 2 * poly->nrings;
374 
375  for (i=0; i<poly->nrings; i++)
376  size += pointArray_GMLsize(poly->rings[i], precision);
377 
378  return size;
379 }
static uint8_t precision
Definition: cu_in_twkb.c:25
int lwpoly_is_empty(const LWPOLY *poly)
Definition: lwpoly.c:418
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1949
POINTARRAY ** rings
Definition: liblwgeom.h:460
uint32_t nrings
Definition: liblwgeom.h:458
unsigned int uint32_t
Definition: uthash.h:78

References lwpoly_is_empty(), LWPOLY::nrings, pointArray_GMLsize(), precision, and LWPOLY::rings.

Referenced by asgml2_collection_size(), asgml2_multi_size(), and asgml2_poly().

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