PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ _rti_iterator_arg_destroy()

static void _rti_iterator_arg_destroy ( _rti_iterator_arg  _param)
static

Definition at line 460 of file rt_mapalgebra.c.

References _rti_iterator_arg_t::arg, _rti_iterator_arg_t::band, _rti_iterator_arg_t::count, _rti_iterator_arg_t::dimension, _rti_iterator_arg_t::empty, _rti_iterator_arg_t::hasnodata, _rti_iterator_arg_t::height, _rti_iterator_arg_t::isempty, _rti_iterator_arg_t::isnodata, _rti_iterator_arg_t::minval, _rti_iterator_arg_t::nodata, rt_iterator_arg_t::nodata, _rti_iterator_arg_t::nodataval, _rti_iterator_arg_t::offset, _rti_iterator_arg_t::raster, _rti_iterator_arg_t::rows, _rti_iterator_arg_t::rtband, rtdealloc(), rt_iterator_arg_t::src_pixel, _rti_iterator_arg_t::values, rt_iterator_arg_t::values, and _rti_iterator_arg_t::width.

Referenced by rt_raster_iterator().

460  {
461  int i = 0;
462 
463  if (_param->raster != NULL)
464  rtdealloc(_param->raster);
465  if (_param->isempty != NULL)
466  rtdealloc(_param->isempty);
467  if (_param->width != NULL)
468  rtdealloc(_param->width);
469  if (_param->height != NULL)
470  rtdealloc(_param->height);
471 
472  if (_param->band.rtband != NULL)
473  rtdealloc(_param->band.rtband);
474  if (_param->band.hasnodata != NULL)
475  rtdealloc(_param->band.hasnodata);
476  if (_param->band.isnodata != NULL)
477  rtdealloc(_param->band.isnodata);
478  if (_param->band.nodataval != NULL)
479  rtdealloc(_param->band.nodataval);
480  if (_param->band.minval != NULL)
481  rtdealloc(_param->band.minval);
482 
483  if (_param->offset != NULL) {
484  for (i = 0; i < _param->count; i++) {
485  if (_param->offset[i] == NULL)
486  continue;
487  rtdealloc(_param->offset[i]);
488  }
489  rtdealloc(_param->offset);
490  }
491 
492  if (_param->empty.values != NULL) {
493  for (i = 0; i < _param->dimension.rows; i++) {
494  if (_param->empty.values[i] == NULL)
495  continue;
496  rtdealloc(_param->empty.values[i]);
497  }
498  rtdealloc(_param->empty.values);
499  }
500  if (_param->empty.nodata != NULL) {
501  for (i = 0; i < _param->dimension.rows; i++) {
502  if (_param->empty.nodata[i] == NULL)
503  continue;
504  rtdealloc(_param->empty.nodata[i]);
505  }
506  rtdealloc(_param->empty.nodata);
507  }
508 
509  if (_param->arg != NULL) {
510  if (_param->arg->values != NULL)
511  rtdealloc(_param->arg->values);
512  if (_param->arg->nodata != NULL)
513  rtdealloc(_param->arg->nodata);
514  if (_param->arg->src_pixel != NULL) {
515  for (i = 0; i < _param->count; i++) {
516  if (_param->arg->src_pixel[i] == NULL)
517  continue;
518  rtdealloc(_param->arg->src_pixel[i]);
519  }
520 
521  rtdealloc(_param->arg->src_pixel);
522  }
523 
524  rtdealloc(_param->arg);
525  }
526 
527  rtdealloc(_param);
528 }
struct _rti_iterator_arg_t::@10 dimension
rt_iterator_arg arg
struct _rti_iterator_arg_t::@11 empty
double *** values
Definition: librtcore.h:2410
void rtdealloc(void *mem)
Definition: rt_context.c:186
struct _rti_iterator_arg_t::@8 band
Here is the call graph for this function:
Here is the caller graph for this function: