PostGIS  3.2.2dev-r@@SVN_REVISION@@

◆ encode_keys()

static void encode_keys ( mvt_agg_context ctx)
static

Definition at line 355 of file mvt.c.

356 {
357  struct mvt_kv_key *kv;
358  size_t n_keys = ctx->keys_hash_i;
359  char **keys = palloc(n_keys * sizeof(*keys));
360  for (kv = ctx->keys_hash; kv != NULL; kv=kv->hh.next)
361  keys[kv->id] = kv->name;
362  ctx->layer->n_keys = n_keys;
363  ctx->layer->keys = keys;
364 
365  HASH_CLEAR(hh, ctx->keys_hash);
366 }
VectorTile__Tile__Layer * layer
Definition: mvt.h:76
uint32_t keys_hash_i
Definition: mvt.h:94
struct mvt_kv_key * keys_hash
Definition: mvt.h:81
uint32_t id
Definition: mvt.c:71
UT_hash_handle hh
Definition: mvt.c:72
char * name
Definition: mvt.c:70
Definition: mvt.c:69

References mvt_kv_key::hh, mvt_kv_key::id, mvt_agg_context::keys_hash, mvt_agg_context::keys_hash_i, mvt_agg_context::layer, and mvt_kv_key::name.

Referenced by mvt_ctx_to_tile().

Here is the caller graph for this function: