PostGIS  2.5.7dev-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.

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 }
#define RASTER_DEBUG(level, msg)
Definition: librtcore.h:295
band
Definition: ovdump.py:57

References ovdump::band, and RASTER_DEBUG.

Referenced by RASTER_setBandNoDataValue(), and test_band_metadata().

Here is the caller graph for this function: