PostGIS  2.1.10dev-r@@SVN_REVISION@@
static int lwline_to_kml2_sb ( const LWLINE line,
int  precision,
const char *  prefix,
stringbuffer_t sb 
)
static

Definition at line 126 of file lwout_kml.c.

References LW_FAILURE, LW_SUCCESS, LWLINE::points, ptarray_to_kml2_sb(), and stringbuffer_aprintf().

Referenced by lwgeom_to_kml2_sb().

127 {
128  /* Open linestring */
129  if ( stringbuffer_aprintf(sb, "<%sLineString><%scoordinates>", prefix, prefix) < 0 ) return LW_FAILURE;
130  /* Coordinate array */
131  if ( ptarray_to_kml2_sb(line->points, precision, sb) == LW_FAILURE ) return LW_FAILURE;
132  /* Close linestring */
133  if ( stringbuffer_aprintf(sb, "</%scoordinates></%sLineString>", prefix, prefix) < 0 ) return LW_FAILURE;
134 
135  return LW_SUCCESS;
136 }
#define LW_SUCCESS
Definition: liblwgeom.h:55
#define LW_FAILURE
Definition: liblwgeom.h:54
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...
Definition: stringbuffer.c:247
static int ptarray_to_kml2_sb(const POINTARRAY *pa, int precision, stringbuffer_t *sb)
Definition: lwout_kml.c:83
POINTARRAY * points
Definition: liblwgeom.h:378

Here is the call graph for this function:

Here is the caller graph for this function: