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

◆ encode_line()

static Data__Geometry * encode_line ( struct geobuf_agg_context ctx,
LWLINE lwline 
)
static

Definition at line 237 of file geobuf.c.

239{
240 POINTARRAY *pa;
241 Data__Geometry *geometry;
242
243 geometry = galloc(DATA__GEOMETRY__TYPE__LINESTRING);
244
245 pa = lwline->points;
246
247 if (pa->npoints == 0)
248 return geometry;
249
250 geometry->n_coords = pa->npoints * ctx->dimensions;
251 geometry->coords = encode_coords(ctx, pa, NULL, pa->npoints, 0);
252
253 return geometry;
254}
static int64_t * encode_coords(struct geobuf_agg_context *ctx, POINTARRAY *pa, int64_t *coords, int len, int offset)
Definition geobuf.c:162
static Data__Geometry * galloc(Data__Geometry__Type type)
Definition geobuf.c:37
POINTARRAY * points
Definition liblwgeom.h:469
uint32_t npoints
Definition liblwgeom.h:413
uint32_t dimensions
Definition geobuf.h:61

References geobuf_agg_context::dimensions, encode_coords(), galloc(), 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: