I've got a script that dumps a floating point raster that I'd like to automatically color. Currently I load this raster in ArcGIS Desktop or QGIS and manually create a color table every time I re-run my model. I'd like my model to automatically create a nice color table, but the only functionality I can find is to create a color table for integer only rasters.

My approach so far is to output 2 rasters, one with floating point values rendered in grayscale and a second integer raster that has the colors on it. I can flip between the two to see values, but it's far from optimal.

Is there a technique to procedurally create floating point color tables in GDAL that automatically load with QGIS or ArcGIS Desktop?

1 Answer 1


For arcgis 10 you could save a layer file with symbology applied and then use a python script to change the data source as part of the output of the originating script. See layer.findAndReplaceWorkspacePath.

For QGIS the 1-band raster colour table plugin might suit: "After selection of a single band raster ... launch this plugin to generate a colour table ... The colour table is made of the combination of a colour palette ... and a colouring method (the way to relate a colour index in the palette to a real value in the raster). " It's not automatic but may alleviate the work a bit.

Alternatively you may be able to work some magic with rgb2pct utility which has the option of loading a colour pallette from an external file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.