PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ rt_band_set_hasnodata_flag()

void rt_band_set_hasnodata_flag ( rt_band  band,
int  flag 
)

Set hasnodata flag value.

Parameters
band: the band on which to set the hasnodata flag
flag: the new hasnodata flag value. Must be 1 or 0.

Definition at line 681 of file rt_band.c.

References rt_band_t::hasnodata, rt_band_t::isnodata, and RASTER_DEBUG.

Referenced by RASTER_setBandNoDataValue(), and test_band_metadata().

681  {
682 
683  assert(NULL != band);
684 
685  band->hasnodata = (flag) ? 1 : 0;
686 
687  /* isnodata depends on hasnodata */
688  if (!band->hasnodata && band->isnodata) {
689  RASTER_DEBUG(3, "Setting isnodata to FALSE as band no longer has NODATA");
690  band->isnodata = 0;
691  }
692 }
int32_t isnodata
Definition: librtcore.h:2319
#define RASTER_DEBUG(level, msg)
Definition: librtcore.h:295
int32_t hasnodata
Definition: librtcore.h:2318
Here is the caller graph for this function: