PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ rtpg_union_arg_destroy()

static void rtpg_union_arg_destroy ( rtpg_union_arg  arg)
static

Definition at line 1768 of file rtpg_mapalgebra.c.

1768  {
1769  int i = 0;
1770  int j = 0;
1771  int k = 0;
1772 
1773  if (arg->bandarg != NULL) {
1774  for (i = 0; i < arg->numband; i++) {
1775  if (!arg->bandarg[i].numraster)
1776  continue;
1777 
1778  for (j = 0; j < arg->bandarg[i].numraster; j++) {
1779  if (arg->bandarg[i].raster[j] == NULL)
1780  continue;
1781 
1782  for (k = rt_raster_get_num_bands(arg->bandarg[i].raster[j]) - 1; k >= 0; k--)
1784  rt_raster_destroy(arg->bandarg[i].raster[j]);
1785  }
1786 
1787  pfree(arg->bandarg[i].raster);
1788  }
1789 
1790  pfree(arg->bandarg);
1791  }
1792 
1793  pfree(arg);
1794 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82
void rt_band_destroy(rt_band band)
Destroy a raster band.
Definition: rt_band.c:340
uint16_t rt_raster_get_num_bands(rt_raster raster)
Definition: rt_raster.c:372
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
Definition: rt_raster.c:381
rtpg_union_band_arg bandarg

References rtpg_union_arg_t::bandarg, rtpg_union_arg_t::numband, rtpg_union_band_arg_t::numraster, rtpg_union_band_arg_t::raster, rt_band_destroy(), rt_raster_destroy(), rt_raster_get_band(), and rt_raster_get_num_bands().

Referenced by RASTER_union_finalfn(), and RASTER_union_transfn().

Here is the call graph for this function:
Here is the caller graph for this function: