PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ mvt_ctx_combine()

mvt_agg_context* mvt_ctx_combine ( mvt_agg_context ctx1,
mvt_agg_context ctx2 
)

Definition at line 1234 of file mvt.c.

References mvt_agg_context::tile, and vectortile_tile_combine().

Referenced by pgis_asmvt_combinefn().

1235 {
1236  if (ctx1 || ctx2)
1237  {
1238  if (ctx1 && ! ctx2) return ctx1;
1239  if (ctx2 && ! ctx1) return ctx2;
1240  if (ctx1 && ctx2 && ctx1->tile && ctx2->tile)
1241  {
1242  mvt_agg_context *ctxnew = palloc(sizeof(mvt_agg_context));
1243  memset(ctxnew, 0, sizeof(mvt_agg_context));
1244  ctxnew->tile = vectortile_tile_combine(ctx1->tile, ctx2->tile);
1245  return ctxnew;
1246  }
1247  else
1248  {
1249  elog(DEBUG2, "ctx1->tile = %p", ctx1->tile);
1250  elog(DEBUG2, "ctx2->tile = %p", ctx2->tile);
1251  elog(ERROR, "%s: unable to combine contexts where tile attribute is null", __func__);
1252  return NULL;
1253  }
1254  }
1255  else
1256  {
1257  return NULL;
1258  }
1259 }
VectorTile__Tile * tile
Definition: mvt.h:67
static VectorTile__Tile * vectortile_tile_combine(VectorTile__Tile *tile1, VectorTile__Tile *tile2)
Definition: mvt.c:1195
Here is the call graph for this function:
Here is the caller graph for this function: