PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ asgml3_point()

static void asgml3_point ( stringbuffer_t sb,
const LWPOINT point,
const GML_Options opts 
)
static

Definition at line 378 of file lwout_gml.c.

379 {
380  int dimension = FLAGS_GET_Z(point->flags) ? 3 : 2;
381 
382  stringbuffer_aprintf(sb, "<%sPoint", opts->prefix);
383  if (opts->srs) stringbuffer_aprintf(sb, " srsName=\"%s\"", opts->srs);
384  if (opts->id) stringbuffer_aprintf(sb, " %sid=\"%s\"", opts->prefix, opts->id);
385  if (lwpoint_is_empty(point))
386  {
387  stringbuffer_append(sb, "/>");
388  return;
389  }
390 
391  stringbuffer_append(sb, ">");
392  if (IS_DIMS(opts->opts))
393  stringbuffer_aprintf(sb, "<%spos srsDimension=\"%d\">", opts->prefix, dimension);
394  else
395  stringbuffer_aprintf(sb, "<%spos>", opts->prefix);
396  asgml3_ptarray(sb, point->point, opts);
397  stringbuffer_aprintf(sb, "</%spos></%sPoint>", opts->prefix, opts->prefix);
398 }
#define IS_DIMS(x)
Definition: liblwgeom.h:1691
#define FLAGS_GET_Z(flags)
Definition: liblwgeom.h:165
int lwpoint_is_empty(const LWPOINT *point)
static void asgml3_ptarray(stringbuffer_t *sb, const POINTARRAY *pa, const GML_Options *opts)
Definition: lwout_gml.c:112
opts
Definition: ovdump.py:45
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.
Definition: stringbuffer.c:247
static void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.h:105
POINTARRAY * point
Definition: liblwgeom.h:471
lwflags_t flags
Definition: liblwgeom.h:473

References asgml3_ptarray(), LWPOINT::flags, FLAGS_GET_Z, IS_DIMS, lwpoint_is_empty(), ovdump::opts, LWPOINT::point, stringbuffer_append(), and stringbuffer_aprintf().

Referenced by asgml3_collection(), asgml3_multi(), and lwgeom_to_gml3().

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