PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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 70 of file lwout_kml.c.

71{
72 switch (geom->type)
73 {
74 case POINTTYPE:
75 return lwpoint_to_kml2_sb((LWPOINT*)geom, precision, prefix, sb);
76
77 case LINETYPE:
78 return lwline_to_kml2_sb((LWLINE*)geom, precision, prefix, sb);
79
80 case TRIANGLETYPE:
81 return lwtriangle_to_kml2_sb((LWTRIANGLE *)geom, precision, prefix, sb);
82
83 case POLYGONTYPE:
84 return lwpoly_to_kml2_sb((LWPOLY*)geom, precision, prefix, sb);
85
86 case MULTIPOINTTYPE:
87 case MULTILINETYPE:
89 case TINTYPE:
90 return lwcollection_to_kml2_sb((LWCOLLECTION*)geom, precision, prefix, sb);
91
92 default:
93 lwerror("lwgeom_to_kml2: '%s' geometry type not supported", lwtype_name(geom->type));
94 return LW_FAILURE;
95 }
96}
static uint8_t precision
Definition cu_in_twkb.c:25
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition lwutil.c:216
#define LW_FAILURE
Definition liblwgeom.h:110
#define MULTILINETYPE
Definition liblwgeom.h:120
#define LINETYPE
Definition liblwgeom.h:117
#define MULTIPOINTTYPE
Definition liblwgeom.h:119
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition liblwgeom.h:116
#define TINTYPE
Definition liblwgeom.h:130
#define MULTIPOLYGONTYPE
Definition liblwgeom.h:121
#define POLYGONTYPE
Definition liblwgeom.h:118
#define TRIANGLETYPE
Definition liblwgeom.h:129
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:207
static int lwpoly_to_kml2_sb(const LWPOLY *poly, int precision, const char *prefix, stringbuffer_t *sb)
Definition lwout_kml.c:174
static int lwpoint_to_kml2_sb(const LWPOINT *point, int precision, const char *prefix, stringbuffer_t *sb)
Definition lwout_kml.c:130
static int lwtriangle_to_kml2_sb(const LWTRIANGLE *tri, int precision, const char *prefix, stringbuffer_t *sb)
Definition lwout_kml.c:155
static int lwline_to_kml2_sb(const LWLINE *line, int precision, const char *prefix, stringbuffer_t *sb)
Definition lwout_kml.c:142
uint8_t type
Definition liblwgeom.h:448

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: