PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ mvt_agg_init_context()

void mvt_agg_init_context ( mvt_agg_context ctx)

Initialize aggregation context.

Definition at line 1233 of file mvt.c.

1234{
1235 VectorTile__Tile__Layer *layer;
1236
1237 POSTGIS_DEBUG(2, "mvt_agg_init_context called");
1238
1239 if (ctx->extent == 0)
1240 elog(ERROR, "mvt_agg_init_context: extent cannot be 0");
1241
1242 ctx->tile = NULL;
1244 ctx->keys_hash = NULL;
1245 ctx->string_values_hash = NULL;
1246 ctx->float_values_hash = NULL;
1247 ctx->double_values_hash = NULL;
1248 ctx->uint_values_hash = NULL;
1249 ctx->sint_values_hash = NULL;
1250 ctx->bool_values_hash = NULL;
1251 ctx->values_hash_i = 0;
1252 ctx->keys_hash_i = 0;
1253 ctx->id_index = UINT32_MAX;
1254 ctx->geom_index = UINT32_MAX;
1255
1256 memset(&ctx->column_cache, 0, sizeof(ctx->column_cache));
1257
1258 layer = palloc(sizeof(*layer));
1259 vector_tile__tile__layer__init(layer);
1260 layer->version = 2;
1261 layer->name = ctx->name;
1262 layer->has_extent = 1;
1263 layer->extent = ctx->extent;
1264 layer->features = palloc (ctx->features_capacity *
1265 sizeof(*layer->features));
1266
1267 ctx->layer = layer;
1268}
#define UINT32_MAX
#define FEATURES_CAPACITY_INITIAL
Definition mvt.c:47
uint32_t geom_index
Definition mvt.h:64
struct mvt_kv_string_value * string_values_hash
Definition mvt.h:71
struct mvt_kv_bool_value * bool_values_hash
Definition mvt.h:76
struct mvt_kv_uint_value * uint_values_hash
Definition mvt.h:74
uint32_t values_hash_i
Definition mvt.h:77
size_t features_capacity
Definition mvt.h:69
VectorTile__Tile__Layer * layer
Definition mvt.h:67
struct mvt_kv_float_value * float_values_hash
Definition mvt.h:72
struct mvt_kv_sint_value * sint_values_hash
Definition mvt.h:75
uint32_t keys_hash_i
Definition mvt.h:78
struct mvt_kv_key * keys_hash
Definition mvt.h:70
VectorTile__Tile * tile
Definition mvt.h:68
uint32_t extent
Definition mvt.h:60
uint32_t id_index
Definition mvt.h:62
struct mvt_kv_double_value * double_values_hash
Definition mvt.h:73
mvt_column_cache column_cache
Definition mvt.h:80
char * name
Definition mvt.h:59

References mvt_agg_context::bool_values_hash, mvt_agg_context::column_cache, mvt_agg_context::double_values_hash, mvt_agg_context::extent, mvt_agg_context::features_capacity, FEATURES_CAPACITY_INITIAL, mvt_agg_context::float_values_hash, mvt_agg_context::geom_index, mvt_agg_context::id_index, mvt_agg_context::keys_hash, mvt_agg_context::keys_hash_i, mvt_agg_context::layer, mvt_agg_context::name, mvt_agg_context::sint_values_hash, mvt_agg_context::string_values_hash, mvt_agg_context::tile, UINT32_MAX, mvt_agg_context::uint_values_hash, and mvt_agg_context::values_hash_i.

Referenced by pgis_asmvt_transfn().

Here is the caller graph for this function: