PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ cu_free_raster()

void cu_free_raster ( rt_raster  raster)

Definition at line 209 of file raster/test/cunit/cu_tester.c.

References ovdump::band, rt_band_destroy(), rt_raster_destroy(), rt_raster_get_band(), and rt_raster_get_num_bands().

Referenced by test_band_get_nearest_pixel(), test_band_get_pixel_line(), test_band_get_pixel_of_value(), test_band_metadata(), test_band_reclass(), test_band_stats(), test_band_value_count(), test_gdal_polygonize(), test_gdal_rasterize(), test_gdal_to_raster(), test_gdal_warp(), test_pixel_set_to_array(), test_raster_cell_to_geopoint(), test_raster_clone(), test_raster_colormap(), test_raster_compute_skewed_raster(), test_raster_convex_hull(), test_raster_empty(), test_raster_envelope(), test_raster_envelope_geom(), test_raster_from_band(), test_raster_from_two_rasters(), test_raster_fully_within_distance(), test_raster_geopoint_to_cell(), test_raster_geos_contains(), test_raster_geos_contains_properly(), test_raster_geos_covered_by(), test_raster_geos_covers(), test_raster_geos_overlaps(), test_raster_geos_touches(), test_raster_intersects(), test_raster_iterator(), test_raster_metadata(), test_raster_new(), test_raster_perimeter(), test_raster_pixel_as_polygon(), test_raster_replace_band(), test_raster_same_alignment(), test_raster_surface(), test_raster_to_gdal(), test_raster_within_distance(), and test_raster_wkb().

209  {
210  uint16_t i;
211  uint16_t nbands = rt_raster_get_num_bands(raster);
212 
213  for (i = 0; i < nbands; ++i) {
214  rt_band band = rt_raster_get_band(raster, i);
215  rt_band_destroy(band);
216  }
217 
218  rt_raster_destroy(raster);
219  raster = NULL;
220 }
uint16_t rt_raster_get_num_bands(rt_raster raster)
Definition: rt_raster.c:372
band
Definition: ovdump.py:57
void rt_band_destroy(rt_band band)
Destroy a raster band.
Definition: rt_band.c:340
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
Definition: rt_raster.c:381
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82
Here is the call graph for this function:
Here is the caller graph for this function: