PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void _rti_warp_arg_destroy ( _rti_warp_arg  arg)
static

Definition at line 9637 of file rt_api.c.

References _rti_warp_arg_t::destroy_drv, _rti_warp_arg_t::drv, _rti_warp_arg_t::ds, _rti_warp_arg_t::dst, rtdealloc(), _rti_warp_arg_t::src, _rti_warp_arg_t::srs, _rti_warp_arg_t::transform, and _rti_warp_arg_t::wopts.

Referenced by rt_raster_gdal_warp().

9637  {
9638  int i = 0;
9639 
9640  if (arg->dst.ds != NULL)
9641  GDALClose(arg->dst.ds);
9642  if (arg->dst.srs != NULL)
9643  CPLFree(arg->dst.srs);
9644 
9645  if (arg->dst.drv != NULL && arg->dst.destroy_drv) {
9646  GDALDeregisterDriver(arg->dst.drv);
9647  GDALDestroyDriver(arg->dst.drv);
9648  }
9649 
9650  if (arg->src.ds != NULL)
9651  GDALClose(arg->src.ds);
9652  if (arg->src.srs != NULL)
9653  CPLFree(arg->src.srs);
9654 
9655  if (arg->src.drv != NULL && arg->src.destroy_drv) {
9656  GDALDeregisterDriver(arg->src.drv);
9657  GDALDestroyDriver(arg->src.drv);
9658  }
9659 
9660  if (arg->transform.func == GDALApproxTransform) {
9661  if (arg->transform.arg.imgproj != NULL)
9662  GDALDestroyGenImgProjTransformer(arg->transform.arg.imgproj);
9663  }
9664 
9665  if (arg->wopts != NULL)
9666  GDALDestroyWarpOptions(arg->wopts);
9667 
9668  if (arg->transform.option.len > 0 && arg->transform.option.item != NULL) {
9669  for (i = 0; i < arg->transform.option.len; i++) {
9670  if (arg->transform.option.item[i] != NULL)
9671  rtdealloc(arg->transform.option.item[i]);
9672  }
9673  rtdealloc(arg->transform.option.item);
9674  }
9675 
9676  rtdealloc(arg);
9677  arg = NULL;
9678 }
void rtdealloc(void *mem)
Definition: rt_api.c:882
GDALWarpOptions * wopts
Definition: rt_api.c:9583
char * srs
Definition: rt_api.c:9579
GDALDatasetH ds
Definition: rt_api.c:9578
struct _rti_warp_arg_t::@6 src
struct _rti_warp_arg_t::@6 dst
GDALDriverH drv
Definition: rt_api.c:9577
void * transform
Definition: rt_api.c:9592

Here is the call graph for this function:

Here is the caller graph for this function: