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

◆ asgml3_multisurface()

static void asgml3_multisurface ( stringbuffer_t sb,
const LWMSURFACE sur,
const GML_Options opts 
)
static

Definition at line 893 of file lwout_gml.c.

894{
895 uint32_t i;
896 LWGEOM* subgeom;
897
898 stringbuffer_aprintf(sb, "<%sMultiSurface", opts->prefix);
899 if (opts->srs) stringbuffer_aprintf(sb, " srsName=\"%s\"", opts->srs);
900 if (opts->id) stringbuffer_aprintf(sb, " %sid=\"%s\"", opts->prefix, opts->id);
901
902 stringbuffer_append(sb, ">");
903
904 for (i = 0; i < sur->ngeoms; ++i)
905 {
906 subgeom = sur->geoms[i];
907 if (subgeom->type == POLYGONTYPE)
908 {
909 asgml3_poly(sb, (LWPOLY*)sur->geoms[i], opts);
910 }
911 else if (subgeom->type == CURVEPOLYTYPE)
912 {
913 asgml3_curvepoly(sb, (LWCURVEPOLY*)sur->geoms[i], opts);
914 }
915 }
916 stringbuffer_aprintf(sb, "</%sMultiSurface>", opts->prefix);
917}
#define CURVEPOLYTYPE
Definition liblwgeom.h:111
#define POLYGONTYPE
Definition liblwgeom.h:104
static void asgml3_curvepoly(stringbuffer_t *sb, const LWCURVEPOLY *poly, const GML_Options *opts)
Definition lwout_gml.c:590
static void asgml3_poly(stringbuffer_t *sb, const LWPOLY *poly, const GML_Options *opts)
Definition lwout_gml.c:456
int stringbuffer_aprintf(stringbuffer_t *s, const char *fmt,...)
Appends a formatted string to the current string buffer, using the format and argument list provided.
static void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
uint8_t type
Definition liblwgeom.h:462
uint32_t ngeoms
Definition liblwgeom.h:636
LWGEOM ** geoms
Definition liblwgeom.h:631

References asgml3_curvepoly(), asgml3_poly(), CURVEPOLYTYPE, LWMSURFACE::geoms, LWMSURFACE::ngeoms, POLYGONTYPE, stringbuffer_append(), stringbuffer_aprintf(), and LWGEOM::type.

Referenced by lwgeom_to_gml3().

Here is the call graph for this function:
Here is the caller graph for this function: