PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ add_value_as_string_with_size()

static void add_value_as_string_with_size ( mvt_agg_context ctx,
char *  value,
size_t  size,
uint32_t tags,
uint32_t  k 
)
static

Definition at line 510 of file mvt.c.

512 {
513  struct mvt_kv_string_value *kv;
514  POSTGIS_DEBUG(2, "add_value_as_string called");
515  HASH_FIND(hh, ctx->string_values_hash, value, size, kv);
516  if (!kv)
517  {
518  POSTGIS_DEBUG(4, "add_value_as_string value not found");
519  kv = palloc(sizeof(*kv));
520  POSTGIS_DEBUGF(4, "add_value_as_string new hash key: %d",
521  ctx->values_hash_i);
522  kv->id = ctx->values_hash_i++;
523  kv->string_value = value;
525  size, kv);
526  }
527  tags[ctx->row_columns*2] = k;
528  tags[ctx->row_columns*2+1] = kv->id;
529 }
int value
Definition: genraster.py:61
struct mvt_kv_string_value * string_values_hash
Definition: mvt.h:70
uint32_t values_hash_i
Definition: mvt.h:76
uint32_t row_columns
Definition: mvt.h:78
uint32_t id
Definition: mvt.c:67
char * string_value
Definition: mvt.c:66
UT_hash_handle hh
Definition: mvt.c:68
#define HASH_ADD_KEYPTR(hh, head, keyptr, keylen_in, add)
Definition: uthash.h:329
#define HASH_FIND(hh, head, keyptr, keylen, out)
Definition: uthash.h:132

References HASH_ADD_KEYPTR, HASH_FIND, mvt_kv_string_value::hh, mvt_kv_string_value::id, mvt_agg_context::row_columns, mvt_kv_string_value::string_value, mvt_agg_context::string_values_hash, genraster::value, and mvt_agg_context::values_hash_i.

Referenced by add_value_as_string().

Here is the caller graph for this function: