131{
132 char tmp[256];
133 size_t size = 64*(poly->
nrings+1)+128;
134 char *result;
135 uint32_t i;
136 char *pad="";
137 static char *nl = "\n";
139
140 LWDEBUG(2,
"lwpoly_summary called");
141
142 result = (
char *)
lwalloc(size);
143
144 snprintf(result, size, "%*.s%s[%s] with %i ring%s",
146 zmflags,
149 ( poly->
nrings > 1 ?
"s:\n" :
":\n")
150 : "s");
151
152 for (i=0; i<poly->
nrings; i++)
153 {
154 snprintf(tmp, sizeof(tmp), "%s ring %i has %i points",
156 if ( i > 0 ) strcat(result,nl);
157 strcat(result,tmp);
158 }
159
160 LWDEBUG(3,
"lwpoly_summary returning");
161
162 return result;
163}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
void * lwalloc(size_t size)
static char * lwgeom_flagchars(LWGEOM *lwg)
#define LWDEBUG(level, msg)