PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ gserialized1_from_any_size()

static size_t gserialized1_from_any_size ( const LWGEOM geom)
static

Definition at line 687 of file gserialized1.c.

688 {
689  LWDEBUGF(2, "Input type: %s", lwtype_name(geom->type));
690 
691  switch (geom->type)
692  {
693  case POINTTYPE:
694  return gserialized1_from_lwpoint_size((LWPOINT *)geom);
695  case LINETYPE:
696  return gserialized1_from_lwline_size((LWLINE *)geom);
697  case POLYGONTYPE:
698  return gserialized1_from_lwpoly_size((LWPOLY *)geom);
699  case TRIANGLETYPE:
701  case CIRCSTRINGTYPE:
703  case CURVEPOLYTYPE:
704  case COMPOUNDTYPE:
705  case MULTIPOINTTYPE:
706  case MULTILINETYPE:
707  case MULTICURVETYPE:
708  case MULTIPOLYGONTYPE:
709  case MULTISURFACETYPE:
711  case TINTYPE:
712  case COLLECTIONTYPE:
714  default:
715  lwerror("Unknown geometry type: %d - %s", geom->type, lwtype_name(geom->type));
716  return 0;
717  }
718 }
static size_t gserialized1_from_lwcollection_size(const LWCOLLECTION *col)
Definition: gserialized1.c:666
static size_t gserialized1_from_lwpoint_size(const LWPOINT *point)
Definition: gserialized1.c:588
static size_t gserialized1_from_lwtriangle_size(const LWTRIANGLE *triangle)
Definition: gserialized1.c:616
static size_t gserialized1_from_lwcircstring_size(const LWCIRCSTRING *curve)
Definition: gserialized1.c:652
static size_t gserialized1_from_lwline_size(const LWLINE *line)
Definition: gserialized1.c:602
static size_t gserialized1_from_lwpoly_size(const LWPOLY *poly)
Definition: gserialized1.c:630
#define COLLECTIONTYPE
Definition: liblwgeom.h:108
#define COMPOUNDTYPE
Definition: liblwgeom.h:110
#define CURVEPOLYTYPE
Definition: liblwgeom.h:111
#define MULTILINETYPE
Definition: liblwgeom.h:106
#define MULTISURFACETYPE
Definition: liblwgeom.h:113
#define LINETYPE
Definition: liblwgeom.h:103
#define MULTIPOINTTYPE
Definition: liblwgeom.h:105
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:102
#define TINTYPE
Definition: liblwgeom.h:116
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:107
#define POLYGONTYPE
Definition: liblwgeom.h:104
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:114
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:109
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:112
#define TRIANGLETYPE
Definition: liblwgeom.h:115
#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:462

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: