PostGIS  2.4.9dev-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.

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

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

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 }
uint8_t precision
Definition: cu_in_twkb.c:25
int lwline_is_empty(const LWLINE *line)
Definition: lwline.c:525
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
Definition: lwout_gml.c:662
POINTARRAY * points
Definition: liblwgeom.h:422
Here is the call graph for this function:
Here is the caller graph for this function: