PostGIS  2.5.0beta1dev-r@@SVN_REVISION@@

◆ mvt_ctx_deserialize()

mvt_agg_context* mvt_ctx_deserialize ( const bytea *  ba)

Definition at line 945 of file mvt.c.

References mvt_allocator(), mvt_deallocator(), and mvt_agg_context::tile.

Referenced by pgis_asmvt_deserialfn().

946 {
947  ProtobufCAllocator allocator = {
950  NULL
951  };
952 
953  size_t len = VARSIZE(ba) - VARHDRSZ;
954  VectorTile__Tile *tile = vector_tile__tile__unpack(&allocator, len, (uint8_t*)VARDATA(ba));
955  mvt_agg_context *ctx = palloc(sizeof(mvt_agg_context));
956  memset(ctx, 0, sizeof(mvt_agg_context));
957  ctx->tile = tile;
958  return ctx;
959 }
VectorTile__Tile * tile
Definition: mvt.h:57
static void * mvt_allocator(__attribute__((__unused__)) void *data, size_t size)
Definition: mvt.c:935
unsigned char uint8_t
Definition: uthash.h:79
static void mvt_deallocator(__attribute__((__unused__)) void *data, void *ptr)
Definition: mvt.c:940
Here is the call graph for this function:
Here is the caller graph for this function: