PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ encode_keys()

static void encode_keys ( mvt_agg_context ctx)
static

Definition at line 379 of file mvt.c.

380 {
381  struct mvt_kv_key *kv;
382  size_t n_keys = ctx->keys_hash_i;
383  char **keys = palloc(n_keys * sizeof(*keys));
384  for (kv = ctx->keys_hash; kv != NULL; kv=kv->hh.next)
385  keys[kv->id] = kv->name;
386  ctx->layer->n_keys = n_keys;
387  ctx->layer->keys = keys;
388 
389  HASH_CLEAR(hh, ctx->keys_hash);
390 }
void * next
Definition: uthash.h:1085
VectorTile__Tile__Layer * layer
Definition: mvt.h:66
uint32_t keys_hash_i
Definition: mvt.h:77
struct mvt_kv_key * keys_hash
Definition: mvt.h:69
uint32_t id
Definition: mvt.c:60
UT_hash_handle hh
Definition: mvt.c:61
char * name
Definition: mvt.c:59
Definition: mvt.c:58
#define HASH_CLEAR(hh, head)
Definition: uthash.h:993

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

Referenced by mvt_ctx_to_tile().

Here is the caller graph for this function: