101 for ( i = 0; i < pa->
npoints; i++ )
106 for (j = 0; j < dims; j++)
157 for ( i = 0; i < poly->
nrings; i++ )
161 rv =
stringbuffer_aprintf(sb,
"<%sinnerBoundaryIs><%sLinearRing><%scoordinates>", prefix, prefix, prefix);
163 rv =
stringbuffer_aprintf(sb,
"<%souterBoundaryIs><%sLinearRing><%scoordinates>", prefix, prefix, prefix);
171 rv =
stringbuffer_aprintf(sb,
"</%scoordinates></%sLinearRing></%sinnerBoundaryIs>", prefix, prefix, prefix);
173 rv =
stringbuffer_aprintf(sb,
"</%scoordinates></%sLinearRing></%souterBoundaryIs>", prefix, prefix, prefix);
190 for ( i = 0; i < col->
ngeoms; i++ )
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static int lwgeom_to_kml2_sb(const LWGEOM *geom, int precision, const char *prefix, stringbuffer_t *sb)
static int lwcollection_to_kml2_sb(const LWCOLLECTION *col, int precision, const char *prefix, stringbuffer_t *sb)
char * lwgeom_to_kml2(const LWGEOM *geom, int precision, const char *prefix)
static int lwpoly_to_kml2_sb(const LWPOLY *poly, int precision, const char *prefix, stringbuffer_t *sb)
static int lwpoint_to_kml2_sb(const LWPOINT *point, int precision, const char *prefix, stringbuffer_t *sb)
static int ptarray_to_kml2_sb(const POINTARRAY *pa, int precision, stringbuffer_t *sb)
static int lwline_to_kml2_sb(const LWLINE *line, int precision, const char *prefix, stringbuffer_t *sb)
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.
int stringbuffer_trim_trailing_zeroes(stringbuffer_t *s)
Trims zeroes off the end of the last number in the stringbuffer.
stringbuffer_t * stringbuffer_create(void)
Allocate a new stringbuffer_t.
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
void stringbuffer_destroy(stringbuffer_t *s)
Free the stringbuffer_t and all memory managed within it.
char * stringbuffer_getstringcopy(stringbuffer_t *s)
Returns a newly allocated string large enough to contain the current state of the string.