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

◆ encode_feature_geometry()

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

Definition at line 285 of file mvt.c.

286{
287 int type = lwgeom->type;
288
289 switch (type)
290 {
291 case POINTTYPE:
292 return encode_point(feature, (LWPOINT*)lwgeom);
293 case LINETYPE:
294 return encode_line(feature, (LWLINE*)lwgeom);
295 case POLYGONTYPE:
296 return encode_poly(feature, (LWPOLY*)lwgeom);
297 case MULTIPOINTTYPE:
298 return encode_mpoint(feature, (LWMPOINT*)lwgeom);
299 case MULTILINETYPE:
300 return encode_mline(feature, (LWMLINE*)lwgeom);
301 case MULTIPOLYGONTYPE:
302 return encode_mpoly(feature, (LWMPOLY*)lwgeom);
303 default: elog(ERROR, "encode_feature_geometry: '%s' geometry type not supported",
304 lwtype_name(type));
305 }
306}
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: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
static void encode_mpoly(struct feature_builder *feature, LWMPOLY *lwmpoly)
Definition mvt.c:266
static void encode_line(struct feature_builder *feature, LWLINE *lwline)
Definition mvt.c:224
static void encode_mline(struct feature_builder *feature, LWMLINE *lwmline)
Definition mvt.c:234
static void encode_poly(struct feature_builder *feature, LWPOLY *lwpoly)
Definition mvt.c:250
static void encode_point(struct feature_builder *feature, LWPOINT *point)
Definition mvt.c:204
static void encode_mpoint(struct feature_builder *feature, LWMPOINT *mpoint)
Definition mvt.c:212
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, and LWGEOM::type.

Referenced by mvt_agg_transfn().

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