548{
549 uint32_t i;
550 size_t size;
551 size_t prefixlen = strlen(prefix);
553
554 size = sizeof("<MultiGeometry></MultiGeometry>");
555 size += (prefixlen * 2);
556
557 if ( srs ) size += strlen(srs) + sizeof(" srsName=..");
558
559 for (i=0; i<col->
ngeoms; i++)
560 {
561 subgeom = col->
geoms[i];
562
563 size += ( sizeof("<geometryMember>/") + prefixlen ) * 2;
565 {
567 }
569 {
571 }
573 {
575 }
577 {
579 }
580 else
581 lwerror(
"asgml2_collection_size: Unable to process geometry type!");
582 }
583
584
585 return size;
586}
#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 asgml2_point_size(const LWPOINT *point, const char *srs, int precision, const char *prefix)
static size_t asgml2_collection_size(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix)
static size_t asgml2_line_size(const LWLINE *line, const char *srs, int precision, const char *prefix)
static size_t asgml2_poly_size(const LWPOLY *poly, const char *srs, int precision, const char *prefix)