PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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 1770 of file lwout_gml.c.

1771{
1772 char* ptr = output;
1773 LWGEOM* subgeom;
1774 uint32_t i;
1775
1776 ptr += sprintf(ptr, "<%sMultiCurve", prefix );
1777 if (srs)
1778 {
1779 ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1780 }
1781 if (id)
1782 {
1783 ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
1784 }
1785 ptr += sprintf( ptr, ">");
1786
1787 for( i = 0; i < cur->ngeoms; ++i )
1788 {
1789 ptr += sprintf(ptr, "<%scurveMember>", prefix );
1790 subgeom = cur->geoms[i];
1791 if ( subgeom->type == LINETYPE )
1792 {
1793 ptr += asgml3_line_buf( (LWLINE*)subgeom, srs, ptr, precision, opts, prefix, id );
1794 }
1795 else if( subgeom->type == CIRCSTRINGTYPE )
1796 {
1797 ptr += asgml3_circstring_buf( (LWCIRCSTRING*)subgeom, srs, ptr, precision, opts, prefix, id );
1798 }
1799 else if( subgeom->type == COMPOUNDTYPE )
1800 {
1801 ptr += asgml3_compound_buf( (LWCOMPOUND*)subgeom, srs, ptr, precision, opts, prefix, id );
1802 }
1803 ptr += sprintf(ptr, "</%scurveMember>", prefix );
1804 }
1805 ptr += sprintf(ptr, "</%sMultiCurve>", prefix );
1806 return (ptr - output);
1807}
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:942
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:1118
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:854
uint8_t type
Definition liblwgeom.h:448

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

Referenced by asgml3_multicurve().

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