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