PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ rt_band_get_ext_band_num()

rt_errorstate rt_band_get_ext_band_num ( rt_band  band,
uint8_t bandnum 
)

Return bands' external band number (only valid when rt_band_is_offline returns non-zero).

Parameters
band: the band
bandnum: external band number (0-based)
Returns
ES_NONE or ES_ERROR if band is NOT out-db

Definition at line 376 of file rt_band.c.

References rt_band_t::data, ES_ERROR, ES_NONE, rt_band_t::offline, and RASTER_DEBUG.

Referenced by RASTER_bandmetadata(), RASTER_tile(), test_band_metadata(), test_band_new_offline_from_path(), and test_raster_wkb().

376  {
377  assert(NULL != band);
378  assert(NULL != bandnum);
379 
380  *bandnum = 0;
381 
382  if (!band->offline) {
383  RASTER_DEBUG(3, "rt_band_get_ext_band_num: Band is not offline");
384  return ES_ERROR;
385  }
386 
387  *bandnum = band->data.offline.bandNum;
388 
389  return ES_NONE;
390 }
int32_t offline
Definition: librtcore.h:2315
#define RASTER_DEBUG(level, msg)
Definition: librtcore.h:295
union rt_band_t::@8 data
Here is the caller graph for this function: