PostGIS  2.5.0dev-r@@SVN_REVISION@@
static void encode_keys ( mvt_agg_context ctx)
static

Definition at line 346 of file mvt.c.

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().

347 {
348  struct mvt_kv_key *kv;
349  size_t n_keys = ctx->keys_hash_i;
350  char **keys = palloc(n_keys * sizeof(*keys));
351  for (kv = ctx->keys_hash; kv != NULL; kv=kv->hh.next)
352  keys[kv->id] = kv->name;
353  ctx->layer->n_keys = n_keys;
354  ctx->layer->keys = keys;
355 
356  HASH_CLEAR(hh, ctx->keys_hash);
357 }
uint32_t id
Definition: mvt.c:56
void * next
Definition: uthash.h:1085
VectorTile__Tile__Layer * layer
Definition: mvt.h:56
uint32_t keys_hash_i
Definition: mvt.h:67
Definition: mvt.c:54
#define HASH_CLEAR(hh, head)
Definition: uthash.h:993
struct mvt_kv_key * keys_hash
Definition: mvt.h:59
UT_hash_handle hh
Definition: mvt.c:57
char * name
Definition: mvt.c:55

Here is the caller graph for this function: