PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ encode_geometry()

static void encode_geometry ( mvt_agg_context ctx,
LWGEOM lwgeom 
)
static

Definition at line 235 of file mvt.c.

236 {
237  int type = lwgeom->type;
238 
239  switch (type)
240  {
241  case POINTTYPE:
242  return encode_point(ctx, (LWPOINT*)lwgeom);
243  case LINETYPE:
244  return encode_line(ctx, (LWLINE*)lwgeom);
245  case POLYGONTYPE:
246  return encode_poly(ctx, (LWPOLY*)lwgeom);
247  case MULTIPOINTTYPE:
248  return encode_mpoint(ctx, (LWMPOINT*)lwgeom);
249  case MULTILINETYPE:
250  return encode_mline(ctx, (LWMLINE*)lwgeom);
251  case MULTIPOLYGONTYPE:
252  return encode_mpoly(ctx, (LWMPOLY*)lwgeom);
253  default: elog(ERROR, "encode_geometry: '%s' geometry type not supported",
254  lwtype_name(type));
255  }
256 }
#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 MULTIPOLYGONTYPE
Definition: liblwgeom.h:121
#define POLYGONTYPE
Definition: liblwgeom.h:118
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
static void encode_poly(mvt_agg_context *ctx, LWPOLY *lwpoly)
Definition: mvt.c:198
static void encode_mline(mvt_agg_context *ctx, LWMLINE *lwmline)
Definition: mvt.c:181
static void encode_mpoly(mvt_agg_context *ctx, LWMPOLY *lwmpoly)
Definition: mvt.c:215
static void encode_mpoint(mvt_agg_context *ctx, LWMPOINT *mpoint)
Definition: mvt.c:157
static void encode_point(mvt_agg_context *ctx, LWPOINT *point)
Definition: mvt.c:148
static void encode_line(mvt_agg_context *ctx, LWLINE *lwline)
Definition: mvt.c:170
type
Definition: ovdump.py:42
uint8_t type
Definition: liblwgeom.h:476

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: