650def fetch_band_nodata(band, default = 0):
651 assert band is not None
652
653 nodata = default
654 if band.GetNoDataValue() is not None:
655 nodata = band.GetNoDataValue()
656 else:
657 logit("WARNING: No nodata flagged in raster_columns metadata. "
658 "In serialized raster, nodata bytes will have value of 0.\n")
659 return nodata
660