PostGIS  2.2.7dev-r@@SVN_REVISION@@
static void lwgeom_to_wkt_sb ( const LWGEOM geom,
stringbuffer_t sb,
int  precision,
uint8_t  variant 
)
static

Definition at line 586 of file lwout_wkt.c.

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

Referenced by lwcollection_to_wkt_sb(), and lwgeom_to_wkt().

587 {
588  LWDEBUGF(4, "lwgeom_to_wkt_sb: type %s, hasz %d, hasm %d",
589  lwtype_name(geom->type), (geom->type),
590  FLAGS_GET_Z(geom->flags)?1:0, FLAGS_GET_M(geom->flags)?1:0);
591 
592  switch (geom->type)
593  {
594  case POINTTYPE:
596  break;
597  case LINETYPE:
599  break;
600  case POLYGONTYPE:
602  break;
603  case MULTIPOINTTYPE:
605  break;
606  case MULTILINETYPE:
608  break;
609  case MULTIPOLYGONTYPE:
611  break;
612  case COLLECTIONTYPE:
614  break;
615  case CIRCSTRINGTYPE:
617  break;
618  case COMPOUNDTYPE:
620  break;
621  case CURVEPOLYTYPE:
623  break;
624  case MULTICURVETYPE:
626  break;
627  case MULTISURFACETYPE:
629  break;
630  case TRIANGLETYPE:
632  break;
633  case TINTYPE:
634  lwtin_to_wkt_sb((LWTIN*)geom, sb, precision, variant);
635  break;
638  break;
639  default:
640  lwerror("lwgeom_to_wkt_sb: Type %d - %s unsupported.",
641  geom->type, lwtype_name(geom->type));
642  }
643 }
#define LINETYPE
Definition: liblwgeom.h:71
static void lwtin_to_wkt_sb(const LWTIN *tin, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:525
static void lwmcurve_to_wkt_sb(const LWMCURVE *mcurv, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:385
#define MULTICURVETYPE
Definition: liblwgeom.h:80
uint8_t variant
Definition: cu_in_twkb.c:26
#define POLYGONTYPE
Definition: liblwgeom.h:72
static void lwpsurface_to_wkt_sb(const LWPSURFACE *psurf, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:554
uint8_t flags
Definition: liblwgeom.h:381
#define CURVEPOLYTYPE
Definition: liblwgeom.h:79
#define COMPOUNDTYPE
Definition: liblwgeom.h:78
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
static void lwcurvepoly_to_wkt_sb(const LWCURVEPOLY *cpoly, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:337
#define TRIANGLETYPE
Definition: liblwgeom.h:83
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:82
static void lwcircstring_to_wkt_sb(const LWCIRCSTRING *circ, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:182
static void lwtriangle_to_wkt_sb(const LWTRIANGLE *tri, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:504
static void lwpoly_to_wkt_sb(const LWPOLY *poly, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:155
static void lwmline_to_wkt_sb(const LWMLINE *mline, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:230
static void lwmpoint_to_wkt_sb(const LWMPOINT *mpoint, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:202
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:188
#define TINTYPE
Definition: liblwgeom.h:84
uint8_t precision
Definition: cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:124
static void lwmpoly_to_wkt_sb(const LWMPOLY *mpoly, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:260
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
static void lwcompound_to_wkt_sb(const LWCOMPOUND *comp, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:292
#define MULTISURFACETYPE
Definition: liblwgeom.h:81
static void lwpoint_to_wkt_sb(const LWPOINT *pt, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:116
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
static void lwcollection_to_wkt_sb(const LWCOLLECTION *collection, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:476
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:125
uint8_t type
Definition: liblwgeom.h:380
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:77
#define MULTILINETYPE
Definition: liblwgeom.h:74
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55
static void lwmsurface_to_wkt_sb(const LWMSURFACE *msurf, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:433
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
#define COLLECTIONTYPE
Definition: liblwgeom.h:76
static void lwline_to_wkt_sb(const LWLINE *line, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:136

Here is the call graph for this function:

Here is the caller graph for this function: