PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ encode_geometry()

static void encode_geometry ( mvt_agg_context ctx,
LWGEOM lwgeom 
)
static

Definition at line 254 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, ovdump::type, and LWGEOM::type.

Referenced by mvt_agg_transfn().

255 {
256  int type = lwgeom->type;
257 
258  switch (type) {
259  case POINTTYPE:
260  return encode_point(ctx, (LWPOINT*)lwgeom);
261  case LINETYPE:
262  return encode_line(ctx, (LWLINE*)lwgeom);
263  case POLYGONTYPE:
264  return encode_poly(ctx, (LWPOLY*)lwgeom);
265  case MULTIPOINTTYPE:
266  return encode_mpoint(ctx, (LWMPOINT*)lwgeom);
267  case MULTILINETYPE:
268  return encode_mline(ctx, (LWMLINE*)lwgeom);
269  case MULTIPOLYGONTYPE:
270  return encode_mpoly(ctx, (LWMPOLY*)lwgeom);
271  default: elog(ERROR, "encode_geometry: '%s' geometry type not supported",
272  lwtype_name(type));
273  }
274 }
#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:161
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:197
static void encode_mpoint(mvt_agg_context *ctx, LWMPOINT *mpoint)
Definition: mvt.c:171
static void encode_line(mvt_agg_context *ctx, LWLINE *lwline)
Definition: mvt.c:185
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
static void encode_poly(mvt_agg_context *ctx, LWPOLY *lwpoly)
Definition: mvt.c:215
#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:233
uint8_t type
Definition: liblwgeom.h:398
type
Definition: ovdump.py:41
#define MULTILINETYPE
Definition: liblwgeom.h:88
Here is the call graph for this function:
Here is the caller graph for this function: