1672{
1673 char *ptr;
1674 uint32_t i;
1676
1677 ptr = output;
1678
1679
1680 ptr += sprintf(ptr, "<%sMultiGeometry", prefix);
1681 if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1682 if (id) ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
1683
1685 {
1686 ptr += sprintf(ptr, "/>");
1687 return (ptr-output);
1688 }
1689 ptr += sprintf(ptr, ">");
1690
1691 for (i=0; i<col->
ngeoms; i++)
1692 {
1693 subgeom = col->
geoms[i];
1694 ptr += sprintf(ptr, "<%sgeometryMember>", prefix);
1696 {
1698 }
1700 {
1702 }
1704 {
1706 }
1708 {
1711 else
1713 }
1714 else
1715 lwerror(
"asgml3_collection_buf: unknown geometry type");
1716
1717 ptr += sprintf(ptr, "</%sgeometryMember>", prefix);
1718 }
1719
1720
1721 ptr += sprintf(ptr, "</%sMultiGeometry>", prefix);
1722
1723 return (ptr-output);
1724}
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static size_t asgml3_multi_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
static size_t asgml3_collection_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
static size_t asgml3_line_buf(const LWLINE *line, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
static size_t asgml3_point_buf(const LWPOINT *point, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
static size_t asgml3_poly_buf(const LWPOLY *poly, const char *srs, char *output, int precision, int opts, int is_patch, const char *prefix, const char *id)