PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ encode_geometry()

static void encode_geometry ( struct 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, ovdump::type, 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:86
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
static void encode_point(struct 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_mpoint(struct mvt_agg_context *ctx, LWMPOINT *mpoint)
Definition: mvt.c:170
static void encode_mline(struct mvt_agg_context *ctx, LWMLINE *lwmline)
Definition: mvt.c:196
static void encode_poly(struct mvt_agg_context *ctx, LWPOLY *lwpoly)
Definition: mvt.c:214
static void encode_mpoly(struct mvt_agg_context *ctx, LWMPOLY *lwmpoly)
Definition: mvt.c:232
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
static void encode_line(struct mvt_agg_context *ctx, LWLINE *lwline)
Definition: mvt.c:184
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
uint8_t type
Definition: liblwgeom.h:396
type
Definition: ovdump.py:41
#define MULTILINETYPE
Definition: liblwgeom.h:89
Here is the call graph for this function:
Here is the caller graph for this function: