PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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 994 of file lwout_gml.c.

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

References IS_DIMS, LWPOLY::nrings, 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: