PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ asgml3_multicurve_buf()

static size_t asgml3_multicurve_buf ( const LWMCURVE cur,
const char *  srs,
char *  output,
int  precision,
int  opts,
const char *  prefix,
const char *  id 
)
static

Definition at line 1777 of file lwout_gml.c.

References asgml3_circstring_buf(), asgml3_compound_buf(), asgml3_line_buf(), CIRCSTRINGTYPE, COMPOUNDTYPE, LWMCURVE::geoms, LINETYPE, LWMCURVE::ngeoms, and LWGEOM::type.

Referenced by asgml3_multicurve().

1778 {
1779  char* ptr = output;
1780  LWGEOM* subgeom;
1781  int i;
1782 
1783  ptr += sprintf(ptr, "<%sMultiCurve", prefix );
1784  if (srs)
1785  {
1786  ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1787  }
1788  if (id)
1789  {
1790  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
1791  }
1792  ptr += sprintf( ptr, ">");
1793 
1794  for( i = 0; i < cur->ngeoms; ++i )
1795  {
1796  ptr += sprintf(ptr, "<%scurveMember>", prefix );
1797  subgeom = cur->geoms[i];
1798  if ( subgeom->type == LINETYPE )
1799  {
1800  ptr += asgml3_line_buf( (LWLINE*)subgeom, srs, ptr, precision, opts, prefix, id );
1801  }
1802  else if( subgeom->type == CIRCSTRINGTYPE )
1803  {
1804  ptr += asgml3_circstring_buf( (LWCIRCSTRING*)subgeom, srs, ptr, precision, opts, prefix, id );
1805  }
1806  else if( subgeom->type == COMPOUNDTYPE )
1807  {
1808  ptr += asgml3_compound_buf( (LWCOMPOUND*)subgeom, srs, ptr, precision, opts, prefix, id );
1809  }
1810  ptr += sprintf(ptr, "</%scurveMember>", prefix );
1811  }
1812  ptr += sprintf(ptr, "</%sMultiCurve>", prefix );
1813  return (ptr - output);
1814 }
int ngeoms
Definition: liblwgeom.h:530
#define LINETYPE
Definition: liblwgeom.h:71
#define COMPOUNDTYPE
Definition: liblwgeom.h:78
static size_t asgml3_compound_buf(const LWCOMPOUND *col, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
Definition: lwout_gml.c:1125
static size_t asgml3_circstring_buf(const LWCIRCSTRING *circ, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
Definition: lwout_gml.c:949
uint8_t precision
Definition: cu_in_twkb.c:25
LWGEOM ** geoms
Definition: liblwgeom.h:532
uint8_t type
Definition: liblwgeom.h:380
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:77
opts
Definition: ovdump.py:44
static size_t asgml3_line_buf(const LWLINE *line, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
Definition: lwout_gml.c:861
Here is the call graph for this function:
Here is the caller graph for this function: