PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ rt_band_get_nodata()

rt_errorstate rt_band_get_nodata ( rt_band  band,
double *  nodata 
)

Get NODATA value.

Parameters
bandthe band whose NODATA value will be returned
nodatathe band's NODATA value
Returns
ES_NONE or ES_ERROR
Parameters
band: the band whose NODATA value will be returned
nodata: the band's NODATA value
Returns
ES_NONE or ES_ERROR

Definition at line 1597 of file rt_band.c.

References ES_ERROR, ES_NONE, rt_band_t::hasnodata, rt_band_t::nodataval, and rterror().

Referenced by _rti_iterator_arg_populate(), RASTER_bandmetadata(), RASTER_clip(), RASTER_getBandNoDataValue(), RASTER_mapAlgebra2(), RASTER_mapAlgebraExpr(), RASTER_mapAlgebraFct(), RASTER_mapAlgebraFctNgb(), RASTER_neighborhood(), RASTER_nMapAlgebra(), RASTER_nMapAlgebraExpr(), RASTER_setPixelValue(), RASTER_setPixelValuesArray(), RASTER_setPixelValuesGeomval(), RASTER_tile(), RASTER_union_finalfn(), RASTER_union_transfn(), rt_band_get_summary_stats(), rt_band_get_value_count(), rt_band_reclass(), rt_raster_colormap(), rt_raster_gdal_polygonize(), rt_raster_gdal_rasterize(), rt_raster_gdal_warp(), rt_raster_intersects(), rt_raster_to_gdal_mem(), test_band_metadata(), test_band_pixtype_16BSI(), test_band_pixtype_16BUI(), test_band_pixtype_1BB(), test_band_pixtype_2BUI(), test_band_pixtype_32BF(), test_band_pixtype_32BSI(), test_band_pixtype_32BUI(), test_band_pixtype_4BUI(), test_band_pixtype_64BF(), test_band_pixtype_8BSI(), test_band_pixtype_8BUI(), test_band_reclass(), test_band_stats(), test_gdal_warp(), test_raster_fully_within_distance(), test_raster_geos_contains(), test_raster_geos_contains_properly(), test_raster_geos_covered_by(), test_raster_geos_covers(), test_raster_geos_overlaps(), test_raster_geos_touches(), test_raster_intersects(), test_raster_replace_band(), test_raster_within_distance(), and test_raster_wkb().

1597  {
1598  assert(NULL != band);
1599  assert(NULL != nodata);
1600 
1601  *nodata = band->nodataval;
1602 
1603  if (!band->hasnodata) {
1604  rterror("rt_band_get_nodata: Band has no NODATA value");
1605  return ES_ERROR;
1606  }
1607 
1608  return ES_NONE;
1609 }
void rterror(const char *fmt,...)
Wrappers used for reporting errors and info.
Definition: rt_context.c:199
double nodataval
Definition: librtcore.h:2272
int32_t hasnodata
Definition: librtcore.h:2269
Here is the call graph for this function: