Finalize aggregation.
Encode into Data message and return it packed as a bytea.
Definition at line 550 of file flatgeobuf.c.
552 POSTGIS_DEBUGF(3,
"called at offset %ld", ctx->
ctx->offset);
556 if (ctx->
ctx->features_count == 0) {
557 flatgeobuf_encode_header(ctx->
ctx);
558 }
else if (ctx->
ctx->create_index) {
559 ctx->
ctx->index_node_size = 16;
560 flatgeobuf_create_index(ctx->
ctx);
563 ReleaseTupleDesc(ctx->
tupdesc);
564 SET_VARSIZE(ctx->
ctx->buf, ctx->
ctx->offset);
565 POSTGIS_DEBUGF(3,
"returning at offset %ld", ctx->
ctx->offset);
566 return ctx->
ctx->buf;
struct flatgeobuf_agg_ctx * flatgeobuf_agg_ctx_init(const char *geom_name, const bool create_index)
Initialize aggregation context.
References flatgeobuf_agg_ctx::ctx, and flatgeobuf_agg_ctx_init().
Referenced by pgis_asflatgeobuf_finalfn().