PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gserialized_from_any_size()

static size_t gserialized_from_any_size ( const LWGEOM geom)
static

Definition at line 773 of file g_serialized.c.

774 {
775  LWDEBUGF(2, "Input type: %s", lwtype_name(geom->type));
776 
777  switch (geom->type)
778  {
779  case POINTTYPE:
780  return gserialized_from_lwpoint_size((LWPOINT *)geom);
781  case LINETYPE:
782  return gserialized_from_lwline_size((LWLINE *)geom);
783  case POLYGONTYPE:
784  return gserialized_from_lwpoly_size((LWPOLY *)geom);
785  case TRIANGLETYPE:
787  case CIRCSTRINGTYPE:
789  case CURVEPOLYTYPE:
790  case COMPOUNDTYPE:
791  case MULTIPOINTTYPE:
792  case MULTILINETYPE:
793  case MULTICURVETYPE:
794  case MULTIPOLYGONTYPE:
795  case MULTISURFACETYPE:
797  case TINTYPE:
798  case COLLECTIONTYPE:
800  default:
801  lwerror("Unknown geometry type: %d - %s", geom->type, lwtype_name(geom->type));
802  return 0;
803  }
804 }
static size_t gserialized_from_lwtriangle_size(const LWTRIANGLE *triangle)
Definition: g_serialized.c:702
static size_t gserialized_from_lwpoint_size(const LWPOINT *point)
Definition: g_serialized.c:674
static size_t gserialized_from_lwcircstring_size(const LWCIRCSTRING *curve)
Definition: g_serialized.c:738
static size_t gserialized_from_lwpoly_size(const LWPOLY *poly)
Definition: g_serialized.c:716
static size_t gserialized_from_lwcollection_size(const LWCOLLECTION *col)
Definition: g_serialized.c:752
static size_t gserialized_from_lwline_size(const LWLINE *line)
Definition: g_serialized.c:688
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
#define COMPOUNDTYPE
Definition: liblwgeom.h:93
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define MULTISURFACETYPE
Definition: liblwgeom.h:96
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
#define TINTYPE
Definition: liblwgeom.h:99
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:97
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:92
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:218
#define MULTICURVETYPE
Definition: liblwgeom.h:95
#define TRIANGLETYPE
Definition: liblwgeom.h:98
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
uint8_t type
Definition: liblwgeom.h:399

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, LWGEOM::type, and LWPOINT::type.

Referenced by gserialized_from_lwcollection_size(), and gserialized_from_lwgeom_size().

Here is the call graph for this function:
Here is the caller graph for this function: