PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized1_from_any_size()

static size_t gserialized1_from_any_size ( const LWGEOM geom)
static

Definition at line 686 of file gserialized1.c.

687 {
688  LWDEBUGF(2, "Input type: %s", lwtype_name(geom->type));
689 
690  switch (geom->type)
691  {
692  case POINTTYPE:
693  return gserialized1_from_lwpoint_size((LWPOINT *)geom);
694  case LINETYPE:
695  return gserialized1_from_lwline_size((LWLINE *)geom);
696  case POLYGONTYPE:
697  return gserialized1_from_lwpoly_size((LWPOLY *)geom);
698  case TRIANGLETYPE:
700  case CIRCSTRINGTYPE:
702  case CURVEPOLYTYPE:
703  case COMPOUNDTYPE:
704  case MULTIPOINTTYPE:
705  case MULTILINETYPE:
706  case MULTICURVETYPE:
707  case MULTIPOLYGONTYPE:
708  case MULTISURFACETYPE:
710  case TINTYPE:
711  case COLLECTIONTYPE:
713  default:
714  lwerror("Unknown geometry type: %d - %s", geom->type, lwtype_name(geom->type));
715  return 0;
716  }
717 }
static size_t gserialized1_from_lwcollection_size(const LWCOLLECTION *col)
Definition: gserialized1.c:665
static size_t gserialized1_from_lwpoint_size(const LWPOINT *point)
Definition: gserialized1.c:587
static size_t gserialized1_from_lwtriangle_size(const LWTRIANGLE *triangle)
Definition: gserialized1.c:615
static size_t gserialized1_from_lwcircstring_size(const LWCIRCSTRING *curve)
Definition: gserialized1.c:651
static size_t gserialized1_from_lwline_size(const LWLINE *line)
Definition: gserialized1.c:601
static size_t gserialized1_from_lwpoly_size(const LWPOLY *poly)
Definition: gserialized1.c:629
#define COLLECTIONTYPE
Definition: liblwgeom.h:122
#define COMPOUNDTYPE
Definition: liblwgeom.h:124
#define CURVEPOLYTYPE
Definition: liblwgeom.h:125
#define MULTILINETYPE
Definition: liblwgeom.h:120
#define MULTISURFACETYPE
Definition: liblwgeom.h:127
#define LINETYPE
Definition: liblwgeom.h:117
#define MULTIPOINTTYPE
Definition: liblwgeom.h:119
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:116
#define TINTYPE
Definition: liblwgeom.h:130
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:121
#define POLYGONTYPE
Definition: liblwgeom.h:118
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:128
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:123
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
#define MULTICURVETYPE
Definition: liblwgeom.h:126
#define TRIANGLETYPE
Definition: liblwgeom.h:129
#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:448

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, gserialized1_from_lwcircstring_size(), gserialized1_from_lwcollection_size(), gserialized1_from_lwline_size(), gserialized1_from_lwpoint_size(), gserialized1_from_lwpoly_size(), gserialized1_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 gserialized1_from_lwcollection_size(), and gserialized1_from_lwgeom_size().

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