PostGIS  2.2.7dev-r@@SVN_REVISION@@
static int lwgeom_to_kml2_sb ( const LWGEOM geom,
int  precision,
const char *  prefix,
stringbuffer_t sb 
)
static

Definition at line 57 of file lwout_kml.c.

References LINETYPE, LW_FAILURE, lwcollection_to_kml2_sb(), lwerror(), lwline_to_kml2_sb(), lwpoint_to_kml2_sb(), lwpoly_to_kml2_sb(), lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, POLYGONTYPE, and LWGEOM::type.

Referenced by lwcollection_to_kml2_sb(), and lwgeom_to_kml2().

58 {
59  switch (geom->type)
60  {
61  case POINTTYPE:
62  return lwpoint_to_kml2_sb((LWPOINT*)geom, precision, prefix, sb);
63 
64  case LINETYPE:
65  return lwline_to_kml2_sb((LWLINE*)geom, precision, prefix, sb);
66 
67  case POLYGONTYPE:
68  return lwpoly_to_kml2_sb((LWPOLY*)geom, precision, prefix, sb);
69 
70  case MULTIPOINTTYPE:
71  case MULTILINETYPE:
72  case MULTIPOLYGONTYPE:
73  return lwcollection_to_kml2_sb((LWCOLLECTION*)geom, precision, prefix, sb);
74 
75  default:
76  lwerror("lwgeom_to_kml2: '%s' geometry type not supported", lwtype_name(geom->type));
77  return LW_FAILURE;
78  }
79 }
#define LINETYPE
Definition: liblwgeom.h:71
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
#define LW_FAILURE
Definition: liblwgeom.h:64
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:188
uint8_t precision
Definition: cu_in_twkb.c:25
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
static int lwcollection_to_kml2_sb(const LWCOLLECTION *col, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:170
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
uint8_t type
Definition: liblwgeom.h:380
static int lwpoly_to_kml2_sb(const LWPOLY *poly, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:138
static int lwline_to_kml2_sb(const LWLINE *line, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:125
#define MULTILINETYPE
Definition: liblwgeom.h:74
static int lwpoint_to_kml2_sb(const LWPOINT *point, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:113
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74

Here is the call graph for this function:

Here is the caller graph for this function: