PostGIS  3.1.6dev-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 1776 of file lwout_gml.c.

1777 {
1778  char* ptr = output;
1779  LWGEOM* subgeom;
1780  uint32_t i;
1781 
1782  ptr += sprintf(ptr, "<%sMultiCurve", prefix );
1783  if (srs)
1784  {
1785  ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1786  }
1787  if (id)
1788  {
1789  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
1790  }
1791  ptr += sprintf( ptr, ">");
1792 
1793  for( i = 0; i < cur->ngeoms; ++i )
1794  {
1795  ptr += sprintf(ptr, "<%scurveMember>", prefix );
1796  subgeom = cur->geoms[i];
1797  if ( subgeom->type == LINETYPE )
1798  {
1799  ptr += asgml3_line_buf( (LWLINE*)subgeom, srs, ptr, precision, opts, prefix, id );
1800  }
1801  else if( subgeom->type == CIRCSTRINGTYPE )
1802  {
1803  ptr += asgml3_circstring_buf( (LWCIRCSTRING*)subgeom, srs, ptr, precision, opts, prefix, id );
1804  }
1805  else if( subgeom->type == COMPOUNDTYPE )
1806  {
1807  ptr += asgml3_compound_buf( (LWCOMPOUND*)subgeom, srs, ptr, precision, opts, prefix, id );
1808  }
1809  ptr += sprintf(ptr, "</%scurveMember>", prefix );
1810  }
1811  ptr += sprintf(ptr, "</%sMultiCurve>", prefix );
1812  return (ptr - output);
1813 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define COMPOUNDTYPE
Definition: liblwgeom.h:124
#define LINETYPE
Definition: liblwgeom.h:117
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:123
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
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:1132
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:863
opts
Definition: ovdump.py:45
uint8_t type
Definition: liblwgeom.h:476

References asgml3_circstring_buf(), asgml3_compound_buf(), asgml3_line_buf(), CIRCSTRINGTYPE, COMPOUNDTYPE, rtgdalraster::cur, LINETYPE, ovdump::opts, precision, and LWGEOM::type.

Referenced by asgml3_multicurve().

Here is the call graph for this function:
Here is the caller graph for this function: