PostGIS  2.5.0dev-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 1771 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().

1772 {
1773  char* ptr = output;
1774  LWGEOM* subgeom;
1775  uint32_t i;
1776 
1777  ptr += sprintf(ptr, "<%sMultiCurve", prefix );
1778  if (srs)
1779  {
1780  ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1781  }
1782  if (id)
1783  {
1784  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
1785  }
1786  ptr += sprintf( ptr, ">");
1787 
1788  for( i = 0; i < cur->ngeoms; ++i )
1789  {
1790  ptr += sprintf(ptr, "<%scurveMember>", prefix );
1791  subgeom = cur->geoms[i];
1792  if ( subgeom->type == LINETYPE )
1793  {
1794  ptr += asgml3_line_buf( (LWLINE*)subgeom, srs, ptr, precision, opts, prefix, id );
1795  }
1796  else if( subgeom->type == CIRCSTRINGTYPE )
1797  {
1798  ptr += asgml3_circstring_buf( (LWCIRCSTRING*)subgeom, srs, ptr, precision, opts, prefix, id );
1799  }
1800  else if( subgeom->type == COMPOUNDTYPE )
1801  {
1802  ptr += asgml3_compound_buf( (LWCOMPOUND*)subgeom, srs, ptr, precision, opts, prefix, id );
1803  }
1804  ptr += sprintf(ptr, "</%scurveMember>", prefix );
1805  }
1806  ptr += sprintf(ptr, "</%sMultiCurve>", prefix );
1807  return (ptr - output);
1808 }
#define LINETYPE
Definition: liblwgeom.h:85
#define COMPOUNDTYPE
Definition: liblwgeom.h:92
unsigned int uint32_t
Definition: uthash.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:1119
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:943
uint8_t precision
Definition: cu_in_twkb.c:25
LWGEOM ** geoms
Definition: liblwgeom.h:550
uint8_t type
Definition: liblwgeom.h:398
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:91
uint32_t ngeoms
Definition: liblwgeom.h:548
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:855
Here is the call graph for this function:
Here is the caller graph for this function: