PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ rt_band_set_isnodata_flag()

rt_errorstate rt_band_set_isnodata_flag ( rt_band  band,
int  flag 
)

Set isnodata flag value.

Parameters
band: the band on which to set the isnodata flag
flag: the new isnodata flag value. Must be 1 or 0
Returns
ES_NONE or ES_ERROR

Definition at line 854 of file rt_band.c.

854 {
855 assert(NULL != band);
856
857 if (!band->hasnodata) {
858 /* silently permit setting isnodata flag to FALSE */
859 if (!flag)
860 band->isnodata = 0;
861 else {
862 rterror("rt_band_set_isnodata_flag: Cannot set isnodata flag as band has no NODATA");
863 return ES_ERROR;
864 }
865 }
866 else
867 band->isnodata = (flag) ? 1 : 0;
868
869 return ES_NONE;
870}
void rterror(const char *fmt,...) __attribute__((format(printf
Wrappers used for reporting errors and info.
@ ES_NONE
Definition librtcore.h:182
@ ES_ERROR
Definition librtcore.h:183

References ES_ERROR, ES_NONE, and rterror().

Referenced by RASTER_setBandIsNoData(), RASTER_tile(), rt_band_set_pixel_line(), and rt_raster_generate_new_band().

Here is the call graph for this function:
Here is the caller graph for this function: