PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ encode_point()

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

Definition at line 194 of file geobuf.c.

196 {
197  int npoints;
198  Data__Geometry *geometry;
199  POINTARRAY *pa;
200 
201  geometry = galloc(DATA__GEOMETRY__TYPE__POINT);
202 
203  pa = lwpoint->point;
204  npoints = pa->npoints;
205 
206  if (npoints == 0)
207  return geometry;
208 
209  geometry->n_coords = npoints * ctx->dimensions;
210  geometry->coords = encode_coords(ctx, pa, NULL, 1, 0);
211 
212  return geometry;
213 }
static Data__Geometry * galloc(Data__Geometry__Type type)
Definition: geobuf.c:36
static int64_t * encode_coords(struct geobuf_agg_context *ctx, POINTARRAY *pa, int64_t *coords, int len, int offset)
Definition: geobuf.c:168
POINTARRAY * point
Definition: liblwgeom.h:414
uint32_t npoints
Definition: liblwgeom.h:374
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: