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

◆ asgml3_tin()

static void asgml3_tin ( stringbuffer_t sb,
const LWTIN tin,
const GML_Options opts 
)
static

Definition at line 740 of file lwout_gml.c.

741{
742 uint32_t i;
743
744 /* Subgeoms don't get an SRS */
745 GML_Options subopts = *opts;
746 subopts.srs = 0;
747
748 /* Open outmost tag */
749 stringbuffer_aprintf(sb, "<%sTin", opts->prefix);
750 if (opts->srs)
751 stringbuffer_aprintf(sb, " srsName=\"%s\"", opts->srs);
752 if (opts->id)
753 stringbuffer_aprintf(sb, " %sid=\"%s\"", opts->prefix, opts->id);
754 stringbuffer_append(sb, ">");
755
756 stringbuffer_aprintf(sb, "<%strianglePatches>", opts->prefix);
757 for (i=0; i<tin->ngeoms; i++)
758 {
759 asgml3_triangle(sb, tin->geoms[i], &subopts);
760 }
761
762 /* Close outmost tag */
763 stringbuffer_aprintf(sb, "</%strianglePatches>", opts->prefix);
764 stringbuffer_aprintf(sb, "</%sTin>", opts->prefix);
765}
static void asgml3_triangle(stringbuffer_t *sb, const LWTRIANGLE *triangle, const GML_Options *opts)
Definition lwout_gml.c:656
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.
const char * srs
Definition lwout_gml.c:41
uint32_t ngeoms
Definition liblwgeom.h:664
LWTRIANGLE ** geoms
Definition liblwgeom.h:659

References asgml3_triangle(), LWTIN::geoms, LWTIN::ngeoms, GML_Options::srs, stringbuffer_append(), and stringbuffer_aprintf().

Referenced by lwgeom_to_gml3().

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