PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ encode_mpoint()

static void encode_mpoint ( mvt_agg_context ctx,
LWMPOINT mpoint 
)
static

Definition at line 185 of file mvt.c.

186 {
187  size_t c;
188  VectorTile__Tile__Feature *feature = ctx->feature;
189  // NOTE: inefficient shortcut LWMPOINT->LWLINE
190  LWLINE *lwline = lwline_from_lwmpoint(mpoint->srid, mpoint);
191  feature->type = VECTOR_TILE__TILE__GEOM_TYPE__POINT;
192  feature->has_type = 1;
193  c = 1 + lwline->points->npoints * 2;
194  feature->geometry = palloc(sizeof(*feature->geometry) * c);
195  feature->n_geometry = encode_ptarray_initial(ctx, MVT_POINT,
196  lwline->points, feature->geometry);
197 }
LWLINE * lwline_from_lwmpoint(int srid, const LWMPOINT *mpoint)
Definition: lwline.c:284
@ MVT_POINT
Definition: mvt.c:52
static uint32_t encode_ptarray_initial(mvt_agg_context *ctx, enum mvt_type type, POINTARRAY *pa, uint32_t *buffer)
Definition: mvt.c:167
POINTARRAY * points
Definition: liblwgeom.h:425
int32_t srid
Definition: liblwgeom.h:470
uint32_t npoints
Definition: liblwgeom.h:374
VectorTile__Tile__Feature * feature
Definition: mvt.h:65

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: