PostGIS  2.5.0beta1dev-r@@SVN_REVISION@@

◆ mvt_ctx_combine()

mvt_agg_context* mvt_ctx_combine ( mvt_agg_context ctx1,
mvt_agg_context ctx2 
)

Definition at line 1105 of file mvt.c.

References mvt_agg_context::tile, and vectortile_tile_combine().

Referenced by pgis_asmvt_combinefn().

1106 {
1107  if (ctx1 || ctx2)
1108  {
1109  if (ctx1 && ! ctx2) return ctx1;
1110  if (ctx2 && ! ctx1) return ctx2;
1111  if (ctx1 && ctx2 && ctx1->tile && ctx2->tile)
1112  {
1113  mvt_agg_context *ctxnew = palloc(sizeof(mvt_agg_context));
1114  memset(ctxnew, 0, sizeof(mvt_agg_context));
1115  ctxnew->tile = vectortile_tile_combine(ctx1->tile, ctx2->tile);
1116  return ctxnew;
1117  }
1118  else
1119  {
1120  elog(DEBUG2, "ctx1->tile = %p", ctx1->tile);
1121  elog(DEBUG2, "ctx2->tile = %p", ctx2->tile);
1122  elog(ERROR, "%s: unable to combine contexts where tile attribute is null", __func__);
1123  return NULL;
1124  }
1125  }
1126  else
1127  {
1128  return NULL;
1129  }
1130 }
VectorTile__Tile * tile
Definition: mvt.h:57
static VectorTile__Tile * vectortile_tile_combine(VectorTile__Tile *tile1, VectorTile__Tile *tile2)
Definition: mvt.c:1066
Here is the call graph for this function:
Here is the caller graph for this function: