PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ encode_values()

static void encode_values ( mvt_agg_context ctx)
static

Definition at line 381 of file mvt.c.

References mvt_agg_context::bool_values_hash, create_value(), mvt_agg_context::double_values_hash, mvt_agg_context::float_values_hash, HASH_CLEAR, mvt_kv_key::hh, mvt_kv_string_value::hh, mvt_kv_string_value::id, mvt_agg_context::layer, MVT_CREATE_VALUES, UT_hash_handle::next, mvt_agg_context::sint_values_hash, mvt_kv_string_value::string_value, mvt_agg_context::string_values_hash, mvt_agg_context::uint_values_hash, genraster::value, and mvt_agg_context::values_hash_i.

Referenced by mvt_ctx_to_tile().

382 {
383  VectorTile__Tile__Value **values;
384  struct mvt_kv_string_value *kv;
385 
386  POSTGIS_DEBUG(2, "encode_values called");
387 
388  values = palloc(ctx->values_hash_i * sizeof(*values));
389  for (kv = ctx->string_values_hash; kv != NULL; kv=kv->hh.next) {
390  VectorTile__Tile__Value *value = create_value();
391  value->string_value = kv->string_value;
392  values[kv->id] = value;
393  }
395  float_values_hash, has_float_value, float_value);
397  double_values_hash, has_double_value, double_value);
399  uint_values_hash, has_uint_value, uint_value);
401  sint_values_hash, has_sint_value, sint_value);
403  bool_values_hash, has_bool_value, bool_value);
404 
405  POSTGIS_DEBUGF(3, "encode_values n_values: %d", ctx->values_hash_i);
406  ctx->layer->n_values = ctx->values_hash_i;
407  ctx->layer->values = values;
408 
415 }
struct mvt_kv_double_value * double_values_hash
Definition: mvt.h:62
struct mvt_kv_string_value * string_values_hash
Definition: mvt.h:60
char * string_value
Definition: mvt.c:61
uint32_t id
Definition: mvt.c:62
struct mvt_kv_float_value * float_values_hash
Definition: mvt.h:61
void * next
Definition: uthash.h:1085
VectorTile__Tile__Layer * layer
Definition: mvt.h:56
struct mvt_kv_uint_value * uint_values_hash
Definition: mvt.h:63
struct mvt_kv_bool_value * bool_values_hash
Definition: mvt.h:65
uint32_t values_hash_i
Definition: mvt.h:66
#define HASH_CLEAR(hh, head)
Definition: uthash.h:993
struct mvt_kv_sint_value * sint_values_hash
Definition: mvt.h:64
static VectorTile__Tile__Value * create_value()
Definition: mvt.c:360
UT_hash_handle hh
Definition: mvt.c:63
int value
Definition: genraster.py:61
#define MVT_CREATE_VALUES(kvtype, hash, hasfield, valuefield)
Definition: mvt.c:367
Here is the call graph for this function:
Here is the caller graph for this function: