PostGIS  2.1.10dev-r@@SVN_REVISION@@
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 2009 of file rt_api.c.

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

Referenced by RASTER_setBandNoDataValue(), and test_band_metadata().

2009  {
2010 
2011  assert(NULL != band);
2012 
2013  band->hasnodata = (flag) ? 1 : 0;
2014 
2015  /* isnodata depends on hasnodata */
2016  if (!band->hasnodata && band->isnodata) {
2017  RASTER_DEBUG(3, "Setting isnodata to FALSE as band no longer has NODATA");
2018  band->isnodata = 0;
2019  }
2020 }
#define RASTER_DEBUG(level, msg)
Definition: rt_api.h:281
int32_t isnodata
Definition: rt_api.h:2244
int32_t hasnodata
Definition: rt_api.h:2243

Here is the caller graph for this function: