PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ encode_mline()

static void encode_mline ( mvt_agg_context ctx,
LWMLINE lwmline 
)
static

Definition at line 181 of file mvt.c.

182 {
183  uint32_t i;
184  int32_t px = 0, py = 0;
185  size_t c = 0, offset = 0;
186  VectorTile__Tile__Feature *feature = ctx->feature;
187  feature->type = VECTOR_TILE__TILE__GEOM_TYPE__LINESTRING;
188  for (i = 0; i < lwmline->ngeoms; i++)
189  c += 2 + lwmline->geoms[i]->points->npoints * 2;
190  feature->geometry = palloc(sizeof(*feature->geometry) * c);
191  for (i = 0; i < lwmline->ngeoms; i++)
192  offset += encode_ptarray(ctx, MVT_LINE,
193  lwmline->geoms[i]->points,
194  feature->geometry + offset, &px, &py);
195  feature->n_geometry = offset;
196 }
@ MVT_LINE
Definition: mvt.c:62
static uint32_t encode_ptarray(__attribute__((__unused__)) mvt_agg_context *ctx, enum mvt_type type, POINTARRAY *pa, uint32_t *buffer, int32_t *px, int32_t *py)
Definition: mvt.c:89
POINTARRAY * points
Definition: liblwgeom.h:497
LWLINE ** geoms
Definition: liblwgeom.h:561
uint32_t ngeoms
Definition: liblwgeom.h:566
uint32_t npoints
Definition: liblwgeom.h:441
VectorTile__Tile__Feature * feature
Definition: mvt.h:75

References encode_ptarray(), mvt_agg_context::feature, LWMLINE::geoms, MVT_LINE, LWMLINE::ngeoms, POINTARRAY::npoints, and LWLINE::points.

Referenced by encode_geometry().

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