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

◆ asgml3_circstring()

static void asgml3_circstring ( stringbuffer_t sb,
const LWCIRCSTRING circ,
const GML_Options opts 
)
static

Definition at line 507 of file lwout_gml.c.

508{
509 int dimension = FLAGS_GET_Z(circ->flags) ? 3 : 2;
510
511 stringbuffer_aprintf(sb, "<%sCurve", opts->prefix);
512 if (opts->srs)
513 {
514 stringbuffer_aprintf(sb, " srsName=\"%s\"", opts->srs);
515 }
516 if (opts->id)
517 {
518 stringbuffer_aprintf(sb, " %sid=\"%s\"", opts->prefix, opts->id);
519 }
520 stringbuffer_append(sb, ">");
521 stringbuffer_aprintf(sb, "<%ssegments>", opts->prefix);
522 stringbuffer_aprintf(sb, "<%sArcString>", opts->prefix);
523 stringbuffer_aprintf(sb, "<%sposList", opts->prefix);
524
525 if (IS_DIMS(opts->opts))
526 {
527 stringbuffer_aprintf(sb, " srsDimension=\"%d\"", dimension);
528 }
529 stringbuffer_append(sb, ">");
530
531 asgml3_ptarray(sb, circ->points, opts);
532
533 stringbuffer_aprintf(sb, "</%sposList>", opts->prefix);
534 stringbuffer_aprintf(sb, "</%sArcString>", opts->prefix);
535 stringbuffer_aprintf(sb, "</%ssegments>", opts->prefix);
536 stringbuffer_aprintf(sb, "</%sCurve>", opts->prefix);
537}
#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:509
POINTARRAY * points
Definition liblwgeom.h:507

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

Referenced by asgml3_curvepoly(), asgml3_multicurve(), and lwgeom_to_gml3().

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