PostGIS  2.4.9dev-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 548 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().

548  {
549 
550  assert(NULL != band);
551 
552  band->hasnodata = (flag) ? 1 : 0;
553 
554  /* isnodata depends on hasnodata */
555  if (!band->hasnodata && band->isnodata) {
556  RASTER_DEBUG(3, "Setting isnodata to FALSE as band no longer has NODATA");
557  band->isnodata = 0;
558  }
559 }
int32_t isnodata
Definition: librtcore.h:2270
#define RASTER_DEBUG(level, msg)
Definition: librtcore.h:295
int32_t hasnodata
Definition: librtcore.h:2269
Here is the caller graph for this function: