PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ encode_mpoint()

static void encode_mpoint ( mvt_agg_context ctx,
LWMPOINT mpoint 
)
static

Definition at line 171 of file mvt.c.

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

Referenced by encode_geometry().

172 {
173  size_t c;
174  VectorTile__Tile__Feature *feature = ctx->feature;
175  // NOTE: inefficient shortcut LWMPOINT->LWLINE
176  LWLINE *lwline = lwline_from_lwmpoint(mpoint->srid, mpoint);
177  feature->type = VECTOR_TILE__TILE__GEOM_TYPE__POINT;
178  feature->has_type = 1;
179  c = 1 + lwline->points->npoints * 2;
180  feature->geometry = palloc(sizeof(*feature->geometry) * c);
181  feature->n_geometry = encode_ptarray_initial(ctx, MVT_POINT,
182  lwline->points, feature->geometry);
183 }
Definition: mvt.c:49
static uint32_t encode_ptarray_initial(mvt_agg_context *ctx, enum mvt_type type, POINTARRAY *pa, uint32_t *buffer)
Definition: mvt.c:153
LWLINE * lwline_from_lwmpoint(int srid, const LWMPOINT *mpoint)
Definition: lwline.c:284
VectorTile__Tile__Feature * feature
Definition: mvt.h:55
int32_t srid
Definition: liblwgeom.h:469
POINTARRAY * points
Definition: liblwgeom.h:424
uint32_t npoints
Definition: liblwgeom.h:373
Here is the call graph for this function:
Here is the caller graph for this function: