Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've got a script that dumps a floating point raster that I'd like to automatically color. Currently I load this raster in Arc 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 Arc?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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 Quantum 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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