PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ lwtriangle_to_kml2_sb()

static int lwtriangle_to_kml2_sb ( const LWTRIANGLE tri,
int  precision,
const char *  prefix,
stringbuffer_t sb 
)
static

Definition at line 146 of file lwout_kml.c.

147 {
148  /* Open polygon */
150  sb, "<%sPolygon><%souterBoundaryIs><%sLinearRing><%scoordinates>", prefix, prefix, prefix, prefix) < 0)
151  return LW_FAILURE;
152  /* Coordinate array */
153  if (ptarray_to_kml2_sb(tri->points, precision, sb) == LW_FAILURE)
154  return LW_FAILURE;
155  /* Close polygon */
157  sb, "</%scoordinates></%sLinearRing></%souterBoundaryIs></%sPolygon>", prefix, prefix, prefix, prefix) <
158  0)
159  return LW_FAILURE;
160 
161  return LW_SUCCESS;
162 }
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.
Definition: stringbuffer.c:247
POINTARRAY * points
Definition: liblwgeom.h:495

References LW_FAILURE, LW_SUCCESS, LWTRIANGLE::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: