PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ asgml3_tin_buf()

static size_t asgml3_tin_buf ( const LWTIN tin,
const char *  srs,
char *  output,
int  precision,
int  opts,
const char *  prefix,
const char *  id 
)
static

Definition at line 1597 of file lwout_gml.c.

References asgml3_triangle_buf(), LWTIN::geoms, and LWTIN::ngeoms.

Referenced by asgml3_tin().

1598 {
1599  char *ptr;
1600  int i;
1601 
1602  ptr = output;
1603 
1604  /* Open outmost tag */
1605  ptr += sprintf(ptr, "<%sTin", prefix);
1606  if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1607  if (id) ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
1608  else ptr += sprintf(ptr, "><%strianglePatches>", prefix);
1609 
1610  for (i=0; i<tin->ngeoms; i++)
1611  {
1612  ptr += asgml3_triangle_buf(tin->geoms[i], 0, ptr, precision,
1613  opts, prefix, id);
1614  }
1615 
1616  /* Close outmost tag */
1617  ptr += sprintf(ptr, "</%strianglePatches></%sTin>", prefix, prefix);
1618 
1619  return (ptr-output);
1620 }
int ngeoms
Definition: liblwgeom.h:569
LWTRIANGLE ** geoms
Definition: liblwgeom.h:571
uint8_t precision
Definition: cu_in_twkb.c:25
static size_t asgml3_triangle_buf(const LWTRIANGLE *triangle, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
Definition: lwout_gml.c:1354
opts
Definition: ovdump.py:44
Here is the call graph for this function:
Here is the caller graph for this function: