PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwline_to_kml2_sb()

static int lwline_to_kml2_sb ( const LWLINE line,
int  precision,
const char *  prefix,
stringbuffer_t sb 
)
static

Definition at line 133 of file lwout_kml.c.

134{
135 /* Open linestring */
136 if ( stringbuffer_aprintf(sb, "<%sLineString><%scoordinates>", prefix, prefix) < 0 ) return LW_FAILURE;
137 /* Coordinate array */
138 if ( ptarray_to_kml2_sb(line->points, precision, sb) == LW_FAILURE ) return LW_FAILURE;
139 /* Close linestring */
140 if ( stringbuffer_aprintf(sb, "</%scoordinates></%sLineString>", prefix, prefix) < 0 ) return LW_FAILURE;
141
142 return LW_SUCCESS;
143}
static uint8_t precision
Definition cu_in_twkb.c:25
#define LW_FAILURE
Definition liblwgeom.h:96
#define LW_SUCCESS
Definition liblwgeom.h:97
static int ptarray_to_kml2_sb(const POINTARRAY *pa, int precision, stringbuffer_t *sb)
Definition lwout_kml.c:98
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.
POINTARRAY * points
Definition liblwgeom.h:483

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

Referenced by lwgeom_to_kml2_sb().

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