PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ asgml2_line_buf()

static size_t asgml2_line_buf ( const LWLINE line,
const char *  srs,
char *  output,
int  precision,
const char *  prefix 
)
static

Definition at line 327 of file lwout_gml.c.

329 {
330  char *ptr=output;
331 
332  ptr += sprintf(ptr, "<%sLineString", prefix);
333  if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
334 
335  if ( lwline_is_empty(line) )
336  {
337  ptr += sprintf(ptr, "/>");
338  return (ptr-output);
339  }
340  ptr += sprintf(ptr, ">");
341 
342  ptr += sprintf(ptr, "<%scoordinates>", prefix);
343  ptr += pointArray_toGML2(line->points, ptr, precision);
344  ptr += sprintf(ptr, "</%scoordinates></%sLineString>", prefix, prefix);
345 
346  return (ptr-output);
347 }
static uint8_t precision
Definition: cu_in_twkb.c:25
int lwline_is_empty(const LWLINE *line)
Definition: lwline.c:511
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
Definition: lwout_gml.c:662
POINTARRAY * points
Definition: liblwgeom.h:425

References lwline_is_empty(), pointArray_toGML2(), LWLINE::points, and precision.

Referenced by asgml2_collection_buf(), asgml2_line(), and asgml2_multi_buf().

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