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

◆ asgml3_triangle()

static void asgml3_triangle ( stringbuffer_t sb,
const LWTRIANGLE triangle,
const GML_Options opts 
)
static

Definition at line 656 of file lwout_gml.c.

657{
658 int dimension = FLAGS_GET_Z(triangle->flags) ? 3 : 2;
659
660 stringbuffer_aprintf(sb, "<%sTriangle", opts->prefix);
661 if (opts->srs) stringbuffer_aprintf(sb, " srsName=\"%s\"", opts->srs);
662 if (opts->id) stringbuffer_aprintf(sb, " %sid=\"%s\"", opts->prefix, opts->id);
663 stringbuffer_append(sb, ">");
664
665 stringbuffer_aprintf(sb, "<%sexterior>", opts->prefix);
666 stringbuffer_aprintf(sb, "<%sLinearRing>", opts->prefix);
667 if (IS_DIMS(opts->opts))
668 stringbuffer_aprintf(sb, "<%sposList srsDimension=\"%d\">", opts->prefix, dimension);
669 else
670 stringbuffer_aprintf(sb, "<%sposList>", opts->prefix);
671
672 asgml3_ptarray(sb, triangle->points, opts);
673 stringbuffer_aprintf(sb, "</%sposList>", opts->prefix);
674 stringbuffer_aprintf(sb, "</%sLinearRing>", opts->prefix);
675 stringbuffer_aprintf(sb, "</%sexterior>", opts->prefix);
676
677 stringbuffer_aprintf(sb, "</%sTriangle>", opts->prefix);
678}
#define IS_DIMS(x)
Definition liblwgeom.h:1721
#define FLAGS_GET_Z(flags)
Definition liblwgeom.h:165
static void asgml3_ptarray(stringbuffer_t *sb, const POINTARRAY *pa, const GML_Options *opts)
Definition lwout_gml.c:112
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.
lwflags_t flags
Definition liblwgeom.h:497
POINTARRAY * points
Definition liblwgeom.h:495

References asgml3_ptarray(), LWTRIANGLE::flags, FLAGS_GET_Z, IS_DIMS, LWTRIANGLE::points, stringbuffer_append(), and stringbuffer_aprintf().

Referenced by asgml3_tin(), and lwgeom_to_gml3().

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