210{
211 int i, ngeoms;
213 Data__Geometry *geometry;
214
215 geometry =
galloc(DATA__GEOMETRY__TYPE__MULTIPOINT);
216
217 ngeoms = lwmpoint->
ngeoms;
218
219 if (ngeoms == 0)
220 return geometry;
221
223
224 for (i = 0; i < ngeoms; i++) {
228 }
229
230 geometry->n_coords = (size_t)ngeoms * ctx->
dimensions;
232
233 return geometry;
234}
static int64_t * encode_coords(struct geobuf_agg_context *ctx, POINTARRAY *pa, int64_t *coords, int len, int offset)
static Data__Geometry * galloc(Data__Geometry__Type type)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...