PostGIS  3.1.6dev-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 353 of file lwout_gml.c.

355 {
356  char *ptr=output;
357 
358  ptr += sprintf(ptr, "<%sLineString", prefix);
359  if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
360 
361  if ( lwline_is_empty(line) )
362  {
363  ptr += sprintf(ptr, "/>");
364  return (ptr-output);
365  }
366  ptr += sprintf(ptr, ">");
367 
368  ptr += sprintf(ptr, "<%scoordinates>", prefix);
369  ptr += pointArray_toGML2(line->points, ptr, precision);
370  ptr += sprintf(ptr, "</%scoordinates></%sLineString>", prefix, prefix);
371 
372  return (ptr-output);
373 }
static uint8_t precision
Definition: cu_in_twkb.c:25
int lwline_is_empty(const LWLINE *line)
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
Definition: lwout_gml.c:678
POINTARRAY * points
Definition: liblwgeom.h:497

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: