PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwgeom_summary()

char* lwgeom_summary ( const LWGEOM lwgeom,
int  offset 
)

Definition at line 145 of file lwgeom_debug.c.

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LINETYPE, lwalloc(), lwcollection_summary(), lwline_summary(), lwpoint_summary(), lwpoly_summary(), MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POINTTYPE, POLYGONTYPE, TINTYPE, TRIANGLETYPE, LWGEOM::type, and LWCOLLECTION::type.

Referenced by GEOS2POSTGIS(), lwcollection_summary(), LWGEOM_makepoly(), LWGEOM_noop(), and LWGEOM_summary().

146 {
147  char *result;
148 
149  switch (lwgeom->type)
150  {
151  case POINTTYPE:
152  return lwpoint_summary((LWPOINT *)lwgeom, offset);
153 
154  case CIRCSTRINGTYPE:
155  case TRIANGLETYPE:
156  case LINETYPE:
157  return lwline_summary((LWLINE *)lwgeom, offset);
158 
159  case POLYGONTYPE:
160  return lwpoly_summary((LWPOLY *)lwgeom, offset);
161 
162  case TINTYPE:
163  case MULTISURFACETYPE:
164  case MULTICURVETYPE:
165  case CURVEPOLYTYPE:
166  case COMPOUNDTYPE:
167  case MULTIPOINTTYPE:
168  case MULTILINETYPE:
169  case MULTIPOLYGONTYPE:
170  case COLLECTIONTYPE:
171  return lwcollection_summary((LWCOLLECTION *)lwgeom, offset);
172  default:
173  result = (char *)lwalloc(256);
174  sprintf(result, "Object is of unknown type: %d",
175  lwgeom->type);
176  return result;
177  }
178 
179  return NULL;
180 }
#define LINETYPE
Definition: liblwgeom.h:71
static char * lwline_summary(LWLINE *line, int offset)
Definition: lwgeom_debug.c:57
#define MULTICURVETYPE
Definition: liblwgeom.h:80
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define CURVEPOLYTYPE
Definition: liblwgeom.h:79
#define COMPOUNDTYPE
Definition: liblwgeom.h:78
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
#define TRIANGLETYPE
Definition: liblwgeom.h:83
static char * lwpoint_summary(LWPOINT *point, int offset)
Definition: lwgeom_debug.c:42
#define TINTYPE
Definition: liblwgeom.h:84
static char * lwpoly_summary(LWPOLY *poly, int offset)
Definition: lwgeom_debug.c:112
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
#define MULTISURFACETYPE
Definition: liblwgeom.h:81
static char * lwcollection_summary(LWCOLLECTION *col, int offset)
Definition: lwgeom_debug.c:74
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
uint8_t type
Definition: liblwgeom.h:380
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:77
void * lwalloc(size_t size)
Definition: lwutil.c:199
#define MULTILINETYPE
Definition: liblwgeom.h:74
#define COLLECTIONTYPE
Definition: liblwgeom.h:76
Here is the call graph for this function:
Here is the caller graph for this function: