PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ asgml3_triangle_size()

static size_t asgml3_triangle_size ( const LWTRIANGLE triangle,
const char *  srs,
int  precision,
int  opts,
const char *  prefix,
const char *  id 
)
static

Definition at line 1350 of file lwout_gml.c.

References IS_DIMS, pointArray_GMLsize(), and LWTRIANGLE::points.

Referenced by asgml3_tin_size(), and asgml3_triangle().

1351 {
1352  size_t size;
1353  size_t prefixlen = strlen(prefix);
1354 
1355  size = ( sizeof("<Triangle><exterior><LinearRing>///") + (prefixlen*3) ) * 2;
1356  size += sizeof("<posList></posList>") + (prefixlen*2);
1357  if (srs) size += strlen(srs) + sizeof(" srsName=..");
1358  if (id) size += strlen(prefix) + strlen(id) + sizeof(" id=..");
1359  if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'");
1360 
1361  size += pointArray_GMLsize(triangle->points, precision);
1362 
1363  return size;
1364 }
POINTARRAY * points
Definition: liblwgeom.h:433
#define IS_DIMS(x)
Definition: liblwgeom.h:1544
uint8_t precision
Definition: cu_in_twkb.c:25
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1987
opts
Definition: ovdump.py:44
Here is the call graph for this function:
Here is the caller graph for this function: