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

◆ 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
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.
POINTARRAY * points
Definition liblwgeom.h:483

References asgml2_ptarray(), lwline_is_empty(), 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: