PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ _rti_colormap_arg_destroy()

static void _rti_colormap_arg_destroy ( _rti_colormap_arg  arg)
static

Definition at line 1493 of file rt_mapalgebra.c.

1493  {
1494  int i = 0;
1495 
1496  if (arg->raster != NULL) {
1497  rt_band band = NULL;
1498 
1499  for (i = rt_raster_get_num_bands(arg->raster) - 1; i >= 0; i--) {
1500  band = rt_raster_get_band(arg->raster, i);
1501  if (band != NULL)
1503  }
1504 
1505  rt_raster_destroy(arg->raster);
1506  }
1507 
1508  if (arg->nexpr) {
1509  for (i = 0; i < arg->nexpr; i++) {
1510  if (arg->expr[i] != NULL)
1511  rtdealloc(arg->expr[i]);
1512  }
1513  rtdealloc(arg->expr);
1514  }
1515 
1516  if (arg->npos)
1517  rtdealloc(arg->pos);
1518 
1519  rtdealloc(arg);
1520  arg = NULL;
1521 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:86
void rt_band_destroy(rt_band band)
Destroy a raster band.
Definition: rt_band.c:491
uint16_t rt_raster_get_num_bands(rt_raster raster)
Definition: rt_raster.c:376
void rtdealloc(void *mem)
Definition: rt_context.c:206
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
Definition: rt_raster.c:385
band
Definition: ovdump.py:58
rt_reclassexpr * expr

References ovdump::band, _rti_colormap_arg_t::expr, _rti_colormap_arg_t::nexpr, _rti_colormap_arg_t::npos, _rti_colormap_arg_t::pos, _rti_colormap_arg_t::raster, rt_band_destroy(), rt_raster_destroy(), rt_raster_get_band(), rt_raster_get_num_bands(), and rtdealloc().

Referenced by rt_raster_colormap().

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