PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ lwpoint_to_kml2_sb()

static int lwpoint_to_kml2_sb ( const LWPOINT point,
int  precision,
const char *  prefix,
stringbuffer_t sb 
)
static

Definition at line 121 of file lwout_kml.c.

122 {
123  /* Open point */
124  if ( stringbuffer_aprintf(sb, "<%sPoint><%scoordinates>", prefix, prefix) < 0 ) return LW_FAILURE;
125  /* Coordinate array */
126  if ( ptarray_to_kml2_sb(point->point, precision, sb) == LW_FAILURE ) return LW_FAILURE;
127  /* Close point */
128  if ( stringbuffer_aprintf(sb, "</%scoordinates></%sPoint>", prefix, prefix) < 0 ) return LW_FAILURE;
129  return LW_SUCCESS;
130 }
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 * point
Definition: liblwgeom.h:471

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