PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ encode_geometry()

static void encode_geometry ( mvt_agg_context ctx,
LWGEOM lwgeom 
)
static

Definition at line 268 of file mvt.c.

269 {
270  int type = lwgeom->type;
271 
272  switch (type)
273  {
274  case POINTTYPE:
275  return encode_point(ctx, (LWPOINT*)lwgeom);
276  case LINETYPE:
277  return encode_line(ctx, (LWLINE*)lwgeom);
278  case POLYGONTYPE:
279  return encode_poly(ctx, (LWPOLY*)lwgeom);
280  case MULTIPOINTTYPE:
281  return encode_mpoint(ctx, (LWMPOINT*)lwgeom);
282  case MULTILINETYPE:
283  return encode_mline(ctx, (LWMLINE*)lwgeom);
284  case MULTIPOLYGONTYPE:
285  return encode_mpoly(ctx, (LWMPOLY*)lwgeom);
286  default: elog(ERROR, "encode_geometry: '%s' geometry type not supported",
287  lwtype_name(type));
288  }
289 }
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POLYGONTYPE
Definition: liblwgeom.h:87
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_poly(mvt_agg_context *ctx, LWPOLY *lwpoly)
Definition: mvt.c:229
static void encode_mline(mvt_agg_context *ctx, LWMLINE *lwmline)
Definition: mvt.c:211
static void encode_mpoly(mvt_agg_context *ctx, LWMPOLY *lwmpoly)
Definition: mvt.c:247
static void encode_mpoint(mvt_agg_context *ctx, LWMPOINT *mpoint)
Definition: mvt.c:185
static void encode_point(mvt_agg_context *ctx, LWPOINT *point)
Definition: mvt.c:175
static void encode_line(mvt_agg_context *ctx, LWLINE *lwline)
Definition: mvt.c:199
type
Definition: ovdump.py:41
uint8_t type
Definition: liblwgeom.h:399

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

Referenced by mvt_agg_transfn().

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