PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ raster_destroy()

static void raster_destroy ( rt_raster  raster)
static

Definition at line 76 of file raster2pgsql.c.

76  {
77  uint16_t i;
78  uint16_t nbands = rt_raster_get_num_bands(raster);
79  for (i = 0; i < nbands; i++) {
81  if (band == NULL) continue;
82 
84  void* mem = rt_band_get_data(band);
85  if (mem) rtdealloc(mem);
86  }
88  }
90 }
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
void rtdealloc(void *mem)
Definition: rt_context.c:186
void * rt_band_get_data(rt_band band)
Get pointer to raster band data.
Definition: rt_band.c:400
int rt_band_get_ownsdata_flag(rt_band band)
Return 0 (FALSE) or non-zero (TRUE) indicating if rt_band is responsible for managing the memory for ...
Definition: rt_band.c:659
int rt_band_is_offline(rt_band band)
Return non-zero if the given band data is on the filesystem.
Definition: rt_band.c:329
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
Definition: rt_raster.c:381
band
Definition: ovdump.py:57
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:121

References ovdump::band, rtrowdump::raster, rt_band_destroy(), rt_band_get_data(), rt_band_get_ownsdata_flag(), rt_band_is_offline(), rt_raster_destroy(), rt_raster_get_band(), rt_raster_get_num_bands(), and rtdealloc().

Here is the call graph for this function: