PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ encode_point()

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

Definition at line 188 of file geobuf.c.

190 {
191  int npoints;
192  Data__Geometry *geometry;
193  POINTARRAY *pa;
194 
195  geometry = galloc(DATA__GEOMETRY__TYPE__POINT);
196 
197  pa = lwpoint->point;
198  npoints = pa->npoints;
199 
200  if (npoints == 0)
201  return geometry;
202 
203  geometry->n_coords = npoints * ctx->dimensions;
204  geometry->coords = encode_coords(ctx, pa, NULL, 1, 0);
205 
206  return geometry;
207 }
static Data__Geometry * galloc(Data__Geometry__Type type)
Definition: geobuf.c:37
static int64_t * encode_coords(struct geobuf_agg_context *ctx, POINTARRAY *pa, int64_t *coords, int len, int offset)
Definition: geobuf.c:162
POINTARRAY * point
Definition: liblwgeom.h:457
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 LWPOINT::point.

Referenced by encode_geometry().

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