593{
594 char *ptr;
595 uint32_t i;
597
598 ptr = output;
599
600
601 ptr += sprintf(ptr, "<%sMultiGeometry", prefix);
602 if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
603
605 {
606 ptr += sprintf(ptr, "/>");
607 return (ptr-output);
608 }
609 ptr += sprintf(ptr, ">");
610
611 for (i=0; i<col->
ngeoms; i++)
612 {
613 subgeom = col->
geoms[i];
614
615 ptr += sprintf(ptr, "<%sgeometryMember>", prefix);
617 {
619 }
621 {
623 }
625 {
627 }
629 {
632 else
634 }
635 ptr += sprintf(ptr, "</%sgeometryMember>", prefix);
636 }
637
638
639 ptr += sprintf(ptr, "</%sMultiGeometry>", prefix);
640
641 return (ptr-output);
642}
#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.
static size_t asgml2_poly_buf(const LWPOLY *poly, const char *srs, char *output, int precision, const char *prefix)
static size_t asgml2_multi_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, const char *prefix)
static size_t asgml2_point_buf(const LWPOINT *point, const char *srs, char *output, int precision, const char *prefix)
static size_t asgml2_line_buf(const LWLINE *line, const char *srs, char *output, int precision, const char *prefix)
static size_t asgml2_collection_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, const char *prefix)