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

◆ asgml3_multicurve_size()

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

Definition at line 1741 of file lwout_gml.c.

1742{
1743 size_t prefixlen = strlen(prefix);
1744 size_t size = sizeof( "<MultiCurve></MultiCurve>" ) + 2 * prefixlen;
1745 if (srs) size += strlen(srs) + sizeof(" srsName=..");
1746 if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
1747 LWGEOM* subgeom;
1748 uint32_t i;
1749
1750 for( i = 0; i < cur->ngeoms; ++i )
1751 {
1752 size += sizeof( "<curveMember></curveMember>" ) + 2 * prefixlen;
1753 subgeom = cur->geoms[i];
1754 if ( subgeom->type == LINETYPE )
1755 {
1756 size += asgml3_line_size( (LWLINE*)subgeom, srs, precision, opts, prefix, id );
1757 }
1758 else if( subgeom->type == CIRCSTRINGTYPE )
1759 {
1760 size += asgml3_circstring_size( (LWCIRCSTRING*)subgeom, srs, precision, opts, prefix, id );
1761 }
1762 else if( subgeom->type == COMPOUNDTYPE )
1763 {
1764 size += asgml3_compound_size( (LWCOMPOUND*)subgeom, srs, precision, opts, prefix, id );
1765 }
1766 }
1767 return size;
1768}
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_line_size(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix, const char *id)
Definition lwout_gml.c:827
static size_t asgml3_circstring_size(const LWCIRCSTRING *circ, const char *srs, int precision, int opts, const char *prefix, const char *id)
Definition lwout_gml.c:929
static size_t asgml3_compound_size(const LWCOMPOUND *col, const char *srs, int precision, int opts, const char *prefix, const char *id)
Definition lwout_gml.c:1076
uint8_t type
Definition liblwgeom.h:448

References asgml3_circstring_size(), asgml3_compound_size(), asgml3_line_size(), 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: