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

◆ lwcollection_to_kml2_sb()

static int lwcollection_to_kml2_sb ( const LWCOLLECTION col,
int  precision,
const char *  prefix,
stringbuffer_t sb 
)
static

Definition at line 198 of file lwout_kml.c.

199{
200 uint32_t i;
201 int rv;
202
203 /* Open geometry */
204 if ( stringbuffer_aprintf(sb, "<%sMultiGeometry>", prefix) < 0 ) return LW_FAILURE;
205 for ( i = 0; i < col->ngeoms; i++ )
206 {
207 rv = lwgeom_to_kml2_sb(col->geoms[i], precision, prefix, sb);
208 if ( rv == LW_FAILURE ) return LW_FAILURE;
209 }
210 /* Close geometry */
211 if ( stringbuffer_aprintf(sb, "</%sMultiGeometry>", prefix) < 0 ) return LW_FAILURE;
212
213 return LW_SUCCESS;
214}
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 lwgeom_to_kml2_sb(const LWGEOM *geom, int precision, const char *prefix, stringbuffer_t *sb)
Definition lwout_kml.c:69
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.
uint32_t ngeoms
Definition liblwgeom.h:580
LWGEOM ** geoms
Definition liblwgeom.h:575

References LWCOLLECTION::geoms, LW_FAILURE, LW_SUCCESS, lwgeom_to_kml2_sb(), LWCOLLECTION::ngeoms, precision, 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: