PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ asgml2_line()

static void asgml2_line ( stringbuffer_t sb,
const LWLINE line,
const GML_Options opts 
)
static

Definition at line 221 of file lwout_gml.c.

222 {
223  stringbuffer_aprintf(sb, "<%sLineString", opts->prefix);
224  if (opts->srs) stringbuffer_aprintf(sb, " srsName=\"%s\"", opts->srs);
225 
226  if (lwline_is_empty(line))
227  {
228  stringbuffer_append(sb, "/>");
229  return;
230  }
231  stringbuffer_append(sb, ">");
232 
233  stringbuffer_aprintf(sb, "<%scoordinates>", opts->prefix);
234  asgml2_ptarray(sb, line->points, opts);
235  stringbuffer_aprintf(sb, "</%scoordinates>", opts->prefix);
236  stringbuffer_aprintf(sb, "</%sLineString>", opts->prefix);
237 }
int lwline_is_empty(const LWLINE *line)
static void asgml2_ptarray(stringbuffer_t *sb, const POINTARRAY *pa, const GML_Options *opts)
Definition: lwout_gml.c:51
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 * points
Definition: liblwgeom.h:483

References asgml2_ptarray(), lwline_is_empty(), ovdump::opts, LWLINE::points, stringbuffer_append(), and stringbuffer_aprintf().

Referenced by asgml2_collection(), asgml2_multi(), and lwgeom_to_gml2().

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