Aggregation step.
Parse a row, turn it into a feature, and add it to the layer.
Expands features array if needed by a factor of 2. Allocates a new feature, increment feature counter and encode geometry and properties into it.
1031{
1032 bool isnull = false;
1033 Datum datum;
1037 VectorTile__Tile__Layer *layer = ctx->
layer;
1038 POSTGIS_DEBUG(2, "mvt_agg_transfn called");
1039
1040
1043
1044
1045 datum = GetAttributeByNum(ctx->
row, ctx->
geom_index + 1, &isnull);
1046 if (isnull)
1047 return;
1048
1049
1051
1052
1055
1056
1059
1060
1061
1063
1064
1065 POSTGIS_DEBUGF(3, "mvt_agg_transfn encoded feature count: %zd", layer->n_features);
1067 {
1069 layer->features = repalloc(layer->features, new_capacity *
1070 sizeof(*layer->features));
1072 POSTGIS_DEBUGF(3, "mvt_agg_transfn new_capacity: %zd", new_capacity);
1073 }
1074
1075
1077}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
static void parse_values(mvt_agg_context *ctx, struct feature_builder *feature)
static VectorTile__Tile__Feature * feature_build(struct feature_builder *builder)
static void parse_column_keys(mvt_agg_context *ctx)
static void feature_init(struct feature_builder *builder)
static void encode_feature_geometry(struct feature_builder *feature, LWGEOM *lwgeom)
VectorTile__Tile__Layer * layer