PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t gserialized_from_any_size ( const LWGEOM geom)
static

Definition at line 506 of file g_serialized.c.

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, gserialized_from_lwcircstring_size(), gserialized_from_lwcollection_size(), gserialized_from_lwline_size(), gserialized_from_lwpoint_size(), gserialized_from_lwpoly_size(), gserialized_from_lwtriangle_size(), LINETYPE, LWDEBUGF, lwerror(), lwtype_name(), MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, TINTYPE, TRIANGLETYPE, and LWGEOM::type.

Referenced by gserialized_from_lwcollection_size(), and gserialized_from_lwgeom_size().

507 {
508  LWDEBUGF(2, "Input type: %s", lwtype_name(geom->type));
509 
510  switch (geom->type)
511  {
512  case POINTTYPE:
513  return gserialized_from_lwpoint_size((LWPOINT *)geom);
514  case LINETYPE:
515  return gserialized_from_lwline_size((LWLINE *)geom);
516  case POLYGONTYPE:
517  return gserialized_from_lwpoly_size((LWPOLY *)geom);
518  case TRIANGLETYPE:
520  case CIRCSTRINGTYPE:
522  case CURVEPOLYTYPE:
523  case COMPOUNDTYPE:
524  case MULTIPOINTTYPE:
525  case MULTILINETYPE:
526  case MULTICURVETYPE:
527  case MULTIPOLYGONTYPE:
528  case MULTISURFACETYPE:
530  case TINTYPE:
531  case COLLECTIONTYPE:
533  default:
534  lwerror("Unknown geometry type: %d - %s", geom->type, lwtype_name(geom->type));
535  return 0;
536  }
537 }
#define LINETYPE
Definition: liblwgeom.h:61
#define MULTICURVETYPE
Definition: liblwgeom.h:70
static size_t gserialized_from_lwcircstring_size(const LWCIRCSTRING *curve)
Definition: g_serialized.c:471
static size_t gserialized_from_lwpoint_size(const LWPOINT *point)
Definition: g_serialized.c:407
#define POLYGONTYPE
Definition: liblwgeom.h:62
#define CURVEPOLYTYPE
Definition: liblwgeom.h:69
#define COMPOUNDTYPE
Definition: liblwgeom.h:68
#define MULTIPOINTTYPE
Definition: liblwgeom.h:63
#define TRIANGLETYPE
Definition: liblwgeom.h:73
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:72
static size_t gserialized_from_lwline_size(const LWLINE *line)
Definition: g_serialized.c:421
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:164
#define TINTYPE
Definition: liblwgeom.h:74
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:65
static size_t gserialized_from_lwcollection_size(const LWCOLLECTION *col)
Definition: g_serialized.c:485
#define MULTISURFACETYPE
Definition: liblwgeom.h:71
static size_t gserialized_from_lwpoly_size(const LWPOLY *poly)
Definition: g_serialized.c:449
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:60
uint8_t type
Definition: liblwgeom.h:352
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:67
#define MULTILINETYPE
Definition: liblwgeom.h:64
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55
static size_t gserialized_from_lwtriangle_size(const LWTRIANGLE *triangle)
Definition: g_serialized.c:435
#define COLLECTIONTYPE
Definition: liblwgeom.h:66

Here is the call graph for this function:

Here is the caller graph for this function: