PostGIS  2.2.7dev-r@@SVN_REVISION@@
static size_t asgml2_line_buf ( const LWLINE line,
const char *  srs,
char *  output,
int  precision,
const char *  prefix 
)
static

Definition at line 314 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().

316 {
317  char *ptr=output;
318 
319  ptr += sprintf(ptr, "<%sLineString", prefix);
320  if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
321 
322  if ( lwline_is_empty(line) )
323  {
324  ptr += sprintf(ptr, "/>");
325  return (ptr-output);
326  }
327  ptr += sprintf(ptr, ">");
328 
329  ptr += sprintf(ptr, "<%scoordinates>", prefix);
330  ptr += pointArray_toGML2(line->points, ptr, precision);
331  ptr += sprintf(ptr, "</%scoordinates></%sLineString>", prefix, prefix);
332 
333  return (ptr-output);
334 }
uint8_t precision
Definition: cu_in_twkb.c:25
int lwline_is_empty(const LWLINE *line)
Definition: lwline.c:496
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
Definition: lwout_gml.c:649
POINTARRAY * points
Definition: liblwgeom.h:406

Here is the call graph for this function:

Here is the caller graph for this function: