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 loaded a GeoTiff in QGIS (Single Band), and applied a Color Mapping. I can view it in the map canvas, but I would like to export the entire mapped GeoTiff as an appropriate 3 Band GeoTiff (i.e to R,G,B values 0-255).

I know that you can export the current view -- but this is too low-resolution, and I would like to retain the current resolution.

Is there a hook in the Python QGIS module that might enable?

share|improve this question
add comment

1 Answer

Raster -> Conversion -> PCT to RGB.

Alternatively, right-click on the colour rendered image and go "Save As". Tick the "Rendered image" radio button.

N.

share|improve this answer
    
Thanks -- my data in RasterBand1 is not scaled (i.e. values greater than 256), so I get this error on Raster -> Conversion -> PCT to RGB: Traceback (most recent call last): File "/usr/local/bin/pct2rgb.py", line 167, in dst_data = Numeric.take(band_lookup,src_data) File "/Library/Python/2.7/site-packages/numpy-1.8.0.dev_9597b1f_20120920-py2.7-macosx‌​-10.8-x86_64.egg/numpy/core/fromnumeric.py", line 104, in take return take(indices, axis, out, mode) IndexError: index 80000 is out of bounds for size 256 When using QGIS Colormap - how does it render the image? –  Chipp Dec 7 '12 at 17:04
    
Oh, how annoying. Have you tried the second method above? I'm using QGIS Master (1.9) here, not sure if this option is available in 1.8. I think you'll get RGB if you use the "Save as" method. N. –  nhopton Dec 7 '12 at 17:17
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.