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

◆ asgml3_multicurve()

static void asgml3_multicurve ( stringbuffer_t sb,
const LWMCURVE cur,
const GML_Options opts 
)
static

Definition at line 854 of file lwout_gml.c.

855{
856 LWGEOM* subgeom;
857 uint32_t i;
858
859 stringbuffer_aprintf(sb, "<%sMultiCurve", opts->prefix);
860 if (opts->srs)
861 {
862 stringbuffer_aprintf(sb, " srsName=\"%s\"", opts->srs);
863 }
864 if (opts->id)
865 {
866 stringbuffer_aprintf(sb, " %sid=\"%s\"", opts->prefix, opts->id);
867 }
868 stringbuffer_append(sb, ">");
869
870 for (i = 0; i < cur->ngeoms; ++i)
871 {
872 stringbuffer_aprintf(sb, "<%scurveMember>", opts->prefix);
873 subgeom = cur->geoms[i];
874 if (subgeom->type == LINETYPE)
875 {
876 asgml3_line(sb, (LWLINE*)subgeom, opts);
877 }
878 else if (subgeom->type == CIRCSTRINGTYPE)
879 {
880 asgml3_circstring(sb, (LWCIRCSTRING*)subgeom, opts);
881 }
882 else if (subgeom->type == COMPOUNDTYPE)
883 {
884 asgml3_compound(sb, (LWCOMPOUND*)subgeom, opts);
885 }
886 stringbuffer_aprintf(sb, "</%scurveMember>", opts->prefix);
887 }
888 stringbuffer_aprintf(sb, "</%sMultiCurve>", opts->prefix);
889}
#define COMPOUNDTYPE
Definition liblwgeom.h:110
#define LINETYPE
Definition liblwgeom.h:103
#define CIRCSTRINGTYPE
Definition liblwgeom.h:109
static void asgml3_compound(stringbuffer_t *sb, const LWCOMPOUND *col, const GML_Options *opts)
Definition lwout_gml.c:540
static void asgml3_circstring(stringbuffer_t *sb, const LWCIRCSTRING *circ, const GML_Options *opts)
Definition lwout_gml.c:507
static void asgml3_line(stringbuffer_t *sb, const LWLINE *line, const GML_Options *opts)
Definition lwout_gml.c:401
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

References asgml3_circstring(), asgml3_compound(), asgml3_line(), CIRCSTRINGTYPE, COMPOUNDTYPE, LINETYPE, 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: