I'm creating some floating point rasters in GDAL with the GeoTIFF driver. When I load the resulting images into QGIS or Arc the default symbology puts the min at -3.40282e38 and max to 3.40282e38, so the raster looks exactly gray. Is there a way I can write the actual range into the GeoTIFF directly so when its loaded into a GIS program it automatically scales the histogram nicely? I've tried creating a default histogram like this:
rasterMin, rasterMax = raster.GetRasterBand(1).ComputeRasterMinMax() raster.GetRasterBand(1).SetDefaultHistogram(rasterMin, rasterMax, 255)
But I get a error that looks like a binding issue:
File "/usr/lib/python2.6/dist-packages/osgeo/gdal.py", line 846, in SetDefaultHistogram return _gdal.Band_SetDefaultHistogram(self, *args) TypeError: not a sequence
Any suggestions on what I could do, or if I've made a mistake?