PostGIS  2.5.0dev-r@@SVN_REVISION@@
static void encode_geometry ( mvt_agg_context ctx,
LWGEOM lwgeom 
)
static

Definition at line 253 of file mvt.c.

References encode_line(), encode_mline(), encode_mpoint(), encode_mpoly(), encode_point(), encode_poly(), LINETYPE, lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, POLYGONTYPE, and LWGEOM::type.

Referenced by mvt_agg_transfn().

254 {
255  int type = lwgeom->type;
256 
257  switch (type) {
258  case POINTTYPE:
259  return encode_point(ctx, (LWPOINT*)lwgeom);
260  case LINETYPE:
261  return encode_line(ctx, (LWLINE*)lwgeom);
262  case POLYGONTYPE:
263  return encode_poly(ctx, (LWPOLY*)lwgeom);
264  case MULTIPOINTTYPE:
265  return encode_mpoint(ctx, (LWMPOINT*)lwgeom);
266  case MULTILINETYPE:
267  return encode_mline(ctx, (LWMLINE*)lwgeom);
268  case MULTIPOLYGONTYPE:
269  return encode_mpoly(ctx, (LWMPOLY*)lwgeom);
270  default: elog(ERROR, "encode_geometry: '%s' geometry type not supported",
271  lwtype_name(type));
272  }
273 }
#define LINETYPE
Definition: liblwgeom.h:85
#define POLYGONTYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:87
static void encode_point(mvt_agg_context *ctx, LWPOINT *point)
Definition: mvt.c:160
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:218
static void encode_mline(mvt_agg_context *ctx, LWMLINE *lwmline)
Definition: mvt.c:196
static void encode_mpoint(mvt_agg_context *ctx, LWMPOINT *mpoint)
Definition: mvt.c:170
static void encode_line(mvt_agg_context *ctx, LWLINE *lwline)
Definition: mvt.c:184
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
static void encode_poly(mvt_agg_context *ctx, LWPOLY *lwpoly)
Definition: mvt.c:214
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:84
static void encode_mpoly(mvt_agg_context *ctx, LWMPOLY *lwmpoly)
Definition: mvt.c:232
uint8_t type
Definition: liblwgeom.h:395
#define MULTILINETYPE
Definition: liblwgeom.h:88

Here is the call graph for this function:

Here is the caller graph for this function: