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

◆ encode_point()

static Data__Geometry * encode_point ( struct geobuf_agg_context ctx,
LWPOINT lwpoint 
)
static

Definition at line 187 of file geobuf.c.

189{
190 int npoints;
191 Data__Geometry *geometry;
192 POINTARRAY *pa;
193
194 geometry = galloc(DATA__GEOMETRY__TYPE__POINT);
195
196 pa = lwpoint->point;
197 npoints = pa->npoints;
198
199 if (npoints == 0)
200 return geometry;
201
202 geometry->n_coords = (size_t)npoints * ctx->dimensions;
203 geometry->coords = encode_coords(ctx, pa, NULL, 1, 0);
204
205 return geometry;
206}
static int64_t * encode_coords(struct geobuf_agg_context *ctx, POINTARRAY *pa, int64_t *coords, int len, int offset)
Definition geobuf.c:161
static Data__Geometry * galloc(Data__Geometry__Type type)
Definition geobuf.c:36
POINTARRAY * point
Definition liblwgeom.h:471
uint32_t npoints
Definition liblwgeom.h:427
uint32_t dimensions
Definition geobuf.h:61

References geobuf_agg_context::dimensions, encode_coords(), galloc(), POINTARRAY::npoints, and LWPOINT::point.

Referenced by encode_geometry().

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