61 result = (
char *)
lwalloc(128+offset);
63 sprintf(result,
"%*.s%s[%s]",
76 result = (
char *)
lwalloc(128+offset);
78 sprintf(result,
"%*.s%s[%s] with %d points",
81 line->points->npoints);
93 static char *nl =
"\n";
97 LWDEBUG(2,
"lwcollection_summary called");
101 sprintf(result,
"%*.s%s[%s] with %d elements\n",
106 for (i=0; i<col->ngeoms; i++)
109 size += strlen(tmp)+1;
112 LWDEBUGF(4,
"Reallocated %d bytes for result", size);
113 if ( i > 0 ) strcat(result,nl);
119 LWDEBUG(3,
"lwcollection_summary returning");
128 size_t size = 64*(poly->
nrings+1)+128;
132 static char *nl =
"\n";
135 LWDEBUG(2,
"lwpoly_summary called");
137 result = (
char *)
lwalloc(size);
139 sprintf(result,
"%*.s%s[%s] with %i rings\n",
144 for (i=0; i<poly->nrings; i++)
146 sprintf(tmp,
"%s ring %i has %i points",
147 pad, i, poly->rings[i]->npoints);
148 if ( i > 0 ) strcat(result,nl);
152 LWDEBUG(3,
"lwpoly_summary returning");
162 switch (lwgeom->
type)
187 sprintf(result,
"Object is of unknown type: %d",
static char * lwline_summary(LWLINE *line, int offset)
#define FLAGS_GET_GEODETIC(flags)
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
#define LWDEBUG(level, msg)
static char * lwpoint_summary(LWPOINT *point, int offset)
static char * lwgeom_flagchars(LWGEOM *lwg)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define FLAGS_GET_BBOX(flags)
#define SRID_UNKNOWN
Unknown SRID value.
static char * lwpoly_summary(LWPOLY *poly, int offset)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
static char * lwcollection_summary(LWCOLLECTION *col, int offset)
void * lwrealloc(void *mem, size_t size)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_M(flags)
void * lwalloc(size_t size)
#define LWDEBUGF(level, msg,...)
This library is the generic geometry handling section of PostGIS.