PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ encode_geometry()

static void encode_geometry ( mvt_agg_context ctx,
LWGEOM lwgeom 
)
static

Definition at line 274 of file mvt.c.

275{
276 int type = lwgeom->type;
277
278 switch (type)
279 {
280 case POINTTYPE:
281 return encode_point(ctx, (LWPOINT*)lwgeom);
282 case LINETYPE:
283 return encode_line(ctx, (LWLINE*)lwgeom);
284 case POLYGONTYPE:
285 return encode_poly(ctx, (LWPOLY*)lwgeom);
286 case MULTIPOINTTYPE:
287 return encode_mpoint(ctx, (LWMPOINT*)lwgeom);
288 case MULTILINETYPE:
289 return encode_mline(ctx, (LWMLINE*)lwgeom);
290 case MULTIPOLYGONTYPE:
291 return encode_mpoly(ctx, (LWMPOLY*)lwgeom);
292 default: elog(ERROR, "encode_geometry: '%s' geometry type not supported",
293 lwtype_name(type));
294 }
295}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition lwutil.c:216
#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
static void encode_poly(mvt_agg_context *ctx, LWPOLY *lwpoly)
Definition mvt.c:235
static void encode_mline(mvt_agg_context *ctx, LWMLINE *lwmline)
Definition mvt.c:217
static void encode_mpoly(mvt_agg_context *ctx, LWMPOLY *lwmpoly)
Definition mvt.c:253
static void encode_mpoint(mvt_agg_context *ctx, LWMPOINT *mpoint)
Definition mvt.c:191
static void encode_point(mvt_agg_context *ctx, LWPOINT *point)
Definition mvt.c:181
static void encode_line(mvt_agg_context *ctx, LWLINE *lwline)
Definition mvt.c:205
uint8_t type
Definition liblwgeom.h:448

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().

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