551 size_t prefixlen = strlen(prefix);
554 size =
sizeof(
"<MultiGeometry></MultiGeometry>");
555 size += (prefixlen * 2);
557 if ( srs ) size += strlen(srs) +
sizeof(
" srsName=..");
559 for (i=0; i<col->
ngeoms; i++)
561 subgeom = col->
geoms[i];
563 size += (
sizeof(
"<geometryMember>/") + prefixlen ) * 2;
581 lwerror(
"asgml2_collection_size: Unable to process geometry type!");
#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)