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

Definition at line 58 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().

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

Here is the call graph for this function:

Here is the caller graph for this function: