PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ encode_mpoint()

static void encode_mpoint ( mvt_agg_context ctx,
LWMPOINT mpoint 
)
static

Definition at line 157 of file mvt.c.

158 {
159  size_t c;
160  VectorTile__Tile__Feature *feature = ctx->feature;
161  // NOTE: inefficient shortcut LWMPOINT->LWLINE
162  LWLINE *lwline = lwline_from_lwmpoint(mpoint->srid, mpoint);
163  feature->type = VECTOR_TILE__TILE__GEOM_TYPE__POINT;
164  c = 1 + lwline->points->npoints * 2;
165  feature->geometry = palloc(sizeof(*feature->geometry) * c);
166  feature->n_geometry = encode_ptarray_initial(ctx, MVT_POINT,
167  lwline->points, feature->geometry);
168 }
LWLINE * lwline_from_lwmpoint(int32_t srid, const LWMPOINT *mpoint)
Definition: lwline.c:275
@ MVT_POINT
Definition: mvt.c:61
static uint32_t encode_ptarray_initial(mvt_agg_context *ctx, enum mvt_type type, POINTARRAY *pa, uint32_t *buffer)
Definition: mvt.c:140
POINTARRAY * points
Definition: liblwgeom.h:497
int32_t srid
Definition: liblwgeom.h:548
uint32_t npoints
Definition: liblwgeom.h:441
VectorTile__Tile__Feature * feature
Definition: mvt.h:75

References encode_ptarray_initial(), mvt_agg_context::feature, lwline_from_lwmpoint(), MVT_POINT, POINTARRAY::npoints, LWLINE::points, and LWMPOINT::srid.

Referenced by encode_geometry().

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