Aggregation step.
Expands features array if needed by a factor of 2. Allocates a new feature, increment feature counter and encode properties into it.
Definition at line 561 of file geobuf.c.
566 Data__FeatureCollection *fc = ctx->
data->feature_collection;
568 Data__Feature *feature;
572 fc->features = repalloc(fc->features, new_capacity *
573 sizeof(*fc->features));
580 if (fc->n_features == 0)
583 datum = GetAttributeByNum(ctx->
row, ctx->
geom_index + 1, &isnull);
593 if (fc->n_features == 0)
598 ctx->
lwgeoms[fc->n_features] = lwgeom;
599 fc->features[fc->n_features++] = feature;
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
static void analyze_geometry_flags(struct geobuf_agg_context *ctx, LWGEOM *lwgeom)
static Data__Feature * encode_feature(struct geobuf_agg_context *ctx)
static void analyze_geometry(struct geobuf_agg_context *ctx, LWGEOM *lwgeom)
static void encode_keys(struct geobuf_agg_context *ctx)
References analyze_geometry(), analyze_geometry_flags(), geobuf_agg_context::data, encode_feature(), encode_keys(), geobuf_agg_context::features_capacity, geobuf_agg_context::geom_index, lwgeom_from_gserialized(), geobuf_agg_context::lwgeoms, and geobuf_agg_context::row.
Referenced by pgis_asgeobuf_transfn().