PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ encode_feature_geometry()

static void encode_feature_geometry ( struct feature_builder feature,
LWGEOM lwgeom 
)
static

Definition at line 286 of file mvt.c.

287 {
288  int type = lwgeom->type;
289 
290  switch (type)
291  {
292  case POINTTYPE:
293  return encode_point(feature, (LWPOINT*)lwgeom);
294  case LINETYPE:
295  return encode_line(feature, (LWLINE*)lwgeom);
296  case POLYGONTYPE:
297  return encode_poly(feature, (LWPOLY*)lwgeom);
298  case MULTIPOINTTYPE:
299  return encode_mpoint(feature, (LWMPOINT*)lwgeom);
300  case MULTILINETYPE:
301  return encode_mline(feature, (LWMLINE*)lwgeom);
302  case MULTIPOLYGONTYPE:
303  return encode_mpoly(feature, (LWMPOLY*)lwgeom);
304  default: elog(ERROR, "encode_feature_geometry: '%s' geometry type not supported",
305  lwtype_name(type));
306  }
307 }
#define MULTILINETYPE
Definition: liblwgeom.h:106
#define LINETYPE
Definition: liblwgeom.h:103
#define MULTIPOINTTYPE
Definition: liblwgeom.h:105
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:102
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:107
#define POLYGONTYPE
Definition: liblwgeom.h:104
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_mpoly(struct feature_builder *feature, LWMPOLY *lwmpoly)
Definition: mvt.c:267
static void encode_line(struct feature_builder *feature, LWLINE *lwline)
Definition: mvt.c:225
static void encode_mline(struct feature_builder *feature, LWMLINE *lwmline)
Definition: mvt.c:235
static void encode_poly(struct feature_builder *feature, LWPOLY *lwpoly)
Definition: mvt.c:251
static void encode_point(struct feature_builder *feature, LWPOINT *point)
Definition: mvt.c:205
static void encode_mpoint(struct feature_builder *feature, LWMPOINT *mpoint)
Definition: mvt.c:213
type
Definition: ovdump.py:42
uint8_t type
Definition: liblwgeom.h:462

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: