PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ lwgeom_to_kml2_sb()

static int lwgeom_to_kml2_sb ( const LWGEOM geom,
int  precision,
const char *  prefix,
stringbuffer_t sb 
)
static

Definition at line 69 of file lwout_kml.c.

70 {
71  switch (geom->type)
72  {
73  case POINTTYPE:
74  return lwpoint_to_kml2_sb((LWPOINT*)geom, precision, prefix, sb);
75 
76  case LINETYPE:
77  return lwline_to_kml2_sb((LWLINE*)geom, precision, prefix, sb);
78 
79  case TRIANGLETYPE:
80  return lwtriangle_to_kml2_sb((LWTRIANGLE *)geom, precision, prefix, sb);
81 
82  case POLYGONTYPE:
83  return lwpoly_to_kml2_sb((LWPOLY*)geom, precision, prefix, sb);
84 
85  case MULTIPOINTTYPE:
86  case MULTILINETYPE:
87  case MULTIPOLYGONTYPE:
88  case TINTYPE:
89  return lwcollection_to_kml2_sb((LWCOLLECTION*)geom, precision, prefix, sb);
90 
91  default:
92  lwerror("lwgeom_to_kml2: '%s' geometry type not supported", lwtype_name(geom->type));
93  return LW_FAILURE;
94  }
95 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define LW_FAILURE
Definition: liblwgeom.h:96
#define MULTILINETYPE
Definition: liblwgeom.h:106
#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
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
#define TRIANGLETYPE
Definition: liblwgeom.h:115
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
static int lwcollection_to_kml2_sb(const LWCOLLECTION *col, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:198
static int lwpoly_to_kml2_sb(const LWPOLY *poly, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:165
static int lwpoint_to_kml2_sb(const LWPOINT *point, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:121
static int lwtriangle_to_kml2_sb(const LWTRIANGLE *tri, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:146
static int lwline_to_kml2_sb(const LWLINE *line, int precision, const char *prefix, stringbuffer_t *sb)
Definition: lwout_kml.c:133
uint8_t type
Definition: liblwgeom.h:462

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

Referenced by lwcollection_to_kml2_sb(), and lwgeom_to_kml2().

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