PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwgeom_to_wkt_sb()

static void lwgeom_to_wkt_sb ( const LWGEOM geom,
stringbuffer_t sb,
int  precision,
uint8_t  variant 
)
static

Definition at line 606 of file lwout_wkt.c.

607 {
608  LWDEBUGF(4, "lwgeom_to_wkt_sb: type %s, hasz %d, hasm %d",
609  lwtype_name(geom->type), (geom->type),
610  FLAGS_GET_Z(geom->flags)?1:0, FLAGS_GET_M(geom->flags)?1:0);
611 
612  switch (geom->type)
613  {
614  case POINTTYPE:
616  break;
617  case LINETYPE:
619  break;
620  case POLYGONTYPE:
622  break;
623  case MULTIPOINTTYPE:
625  break;
626  case MULTILINETYPE:
628  break;
629  case MULTIPOLYGONTYPE:
631  break;
632  case COLLECTIONTYPE:
634  break;
635  case CIRCSTRINGTYPE:
637  break;
638  case COMPOUNDTYPE:
640  break;
641  case CURVEPOLYTYPE:
643  break;
644  case MULTICURVETYPE:
646  break;
647  case MULTISURFACETYPE:
649  break;
650  case TRIANGLETYPE:
652  break;
653  case TINTYPE:
654  lwtin_to_wkt_sb((LWTIN*)geom, sb, precision, variant);
655  break;
658  break;
659  default:
660  lwerror("lwgeom_to_wkt_sb: Type %d - %s unsupported.",
661  geom->type, lwtype_name(geom->type));
662  }
663 }
static uint8_t variant
Definition: cu_in_twkb.c:26
static uint8_t precision
Definition: cu_in_twkb.c:25
#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 FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:140
#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 FLAGS_GET_M(flags)
Definition: liblwgeom.h:141
#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
static void lwcircstring_to_wkt_sb(const LWCIRCSTRING *circ, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:202
static void lwmsurface_to_wkt_sb(const LWMSURFACE *msurf, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:453
static void lwtin_to_wkt_sb(const LWTIN *tin, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:545
static void lwcollection_to_wkt_sb(const LWCOLLECTION *collection, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:496
static void lwcompound_to_wkt_sb(const LWCOMPOUND *comp, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:312
static void lwmcurve_to_wkt_sb(const LWMCURVE *mcurv, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:405
static void lwline_to_wkt_sb(const LWLINE *line, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:156
static void lwtriangle_to_wkt_sb(const LWTRIANGLE *tri, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:524
static void lwmpoint_to_wkt_sb(const LWMPOINT *mpoint, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:222
static void lwcurvepoly_to_wkt_sb(const LWCURVEPOLY *cpoly, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:357
static void lwpoint_to_wkt_sb(const LWPOINT *pt, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:136
static void lwmline_to_wkt_sb(const LWMLINE *mline, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:250
static void lwmpoly_to_wkt_sb(const LWMPOLY *mpoly, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:280
static void lwpoly_to_wkt_sb(const LWPOLY *poly, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:175
static void lwpsurface_to_wkt_sb(const LWPSURFACE *psurf, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:574
uint8_t type
Definition: liblwgeom.h:399
uint8_t flags
Definition: liblwgeom.h:400

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LWGEOM::flags, FLAGS_GET_M, FLAGS_GET_Z, LINETYPE, lwcircstring_to_wkt_sb(), lwcollection_to_wkt_sb(), lwcompound_to_wkt_sb(), lwcurvepoly_to_wkt_sb(), LWDEBUGF, lwerror(), lwline_to_wkt_sb(), lwmcurve_to_wkt_sb(), lwmline_to_wkt_sb(), lwmpoint_to_wkt_sb(), lwmpoly_to_wkt_sb(), lwmsurface_to_wkt_sb(), lwpoint_to_wkt_sb(), lwpoly_to_wkt_sb(), lwpsurface_to_wkt_sb(), lwtin_to_wkt_sb(), lwtriangle_to_wkt_sb(), lwtype_name(), MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, precision, TINTYPE, TRIANGLETYPE, LWGEOM::type, LWPOINT::type, and variant.

Referenced by lwcollection_to_wkt_sb(), and lwgeom_to_wkt().

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