PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ rt_band_get_data()

void* rt_band_get_data ( rt_band  band)

Get pointer to raster band data.

band: the band who's data to get
pointer to band data or NULL if error

Definition at line 396 of file rt_band.c.

References rt_band_t::data, ES_NONE, rt_band_t::mem, rt_band_t::offline, and rt_band_load_offline_data().

Referenced by raster_destroy(), rt_band_get_pixel(), rt_band_get_pixel_line(), rt_band_get_quantiles_stream(), rt_band_get_value_count(), rt_band_set_pixel(), rt_band_set_pixel_line(), rt_raster_to_gdal_mem(), rt_raster_to_wkb(), and test_band_metadata().

396  {
397  assert(NULL != band);
399  if (band->offline) {
400  if (band->data.offline.mem != NULL)
401  return band->data.offline.mem;
403  if (rt_band_load_offline_data(band) != ES_NONE)
404  return NULL;
405  else
406  return band->data.offline.mem;
407  }
408  else
409  return band->data.mem;
410 }
int32_t offline
Definition: librtcore.h:2295
void * mem
Definition: librtcore.h:2307
rt_errorstate rt_band_load_offline_data(rt_band band)
Load offline band's data.
Definition: rt_band.c:425
union rt_band_t::@8 data
Here is the call graph for this function:
Here is the caller graph for this function: