PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ encode_values()

static void encode_values ( struct mvt_agg_context ctx)
static

Definition at line 378 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_agg_finalfn().

379 {
380  POSTGIS_DEBUG(2, "encode_values called");
381  VectorTile__Tile__Value **values;
382  values = palloc(ctx->values_hash_i * sizeof(*values));
383  struct mvt_kv_string_value *kv;
384  for (kv = ctx->string_values_hash; kv != NULL; kv=kv->hh.next) {
385  VectorTile__Tile__Value *value = create_value();
386  value->string_value = kv->string_value;
387  values[kv->id] = value;
388  }
390  float_values_hash, has_float_value, float_value);
392  double_values_hash, has_double_value, double_value);
394  uint_values_hash, has_uint_value, uint_value);
396  sint_values_hash, has_sint_value, sint_value);
398  bool_values_hash, has_bool_value, bool_value);
399 
400  POSTGIS_DEBUGF(3, "encode_values n_values: %d", ctx->values_hash_i);
401  ctx->layer->n_values = ctx->values_hash_i;
402  ctx->layer->values = values;
403 
410 }
struct mvt_kv_double_value * double_values_hash
Definition: mvt.h:61
struct mvt_kv_string_value * string_values_hash
Definition: mvt.h:59
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:60
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:62
struct mvt_kv_bool_value * bool_values_hash
Definition: mvt.h:64
uint32_t values_hash_i
Definition: mvt.h:65
#define HASH_CLEAR(hh, head)
Definition: uthash.h:993
struct mvt_kv_sint_value * sint_values_hash
Definition: mvt.h:63
static VectorTile__Tile__Value * create_value()
Definition: mvt.c:359
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:366
Here is the call graph for this function:
Here is the caller graph for this function: