[GRASS-dev] new r.out.gdal fails to preserve 8bit color

Moritz Lennert mlennert at club.worldonline.be
Wed Jan 17 03:23:25 EST 2007


On 16/01/07 22:14, Markus Neteler wrote:
> On Tue, Jan 16, 2007 at 09:53:41PM +0100, Markus Neteler wrote:
>> On Tue, Jan 16, 2007 at 07:03:15PM +0100, Maciej Sieczka wrote:
>>> Maciej Sieczka wrote:
>>>> Vytautas,
>>>>
>>>> Exporting a CELL GRASS raster, value range 0-255, r.out.gdal issues an:
>>>>
>>>> ERROR 6: SetColorInterpretation() not supported for this dataset.
>>>>
>>>> and the output map is greyscale.
>>> There is a discussion about this defect on the GDAL dev list:
>>> http://www.nabble.com/r.out.gdal%3A-SetColorInterpretation%28%29-not-supported-tf3021127.html
>>>
>> Probably the mapgdal.c file of MapServer could be an inspiration?
> 
> I found some more:
> 
> http://www.nabble.com/Re:-How-to-set-a-ColorTable-from-scratch--p5000321.html
> http://www.archivesat.com/FreeGIS_project/thread1933209.htm
> 
> and GDAL
> apps/gdalwarpsimple.c
> 
> Still lost :-)


In the very first thread, Frank says:

"Generally speaking to produce a GeoTIFF file with a color table after 
using Create() to create it, you need to do the SetColorTable() *before* 
writing any raster data."

I don't see any call to SetColorTable in main.c of r.out.gdal. Could 
this be the problem ?

Moritz




More information about the grass-dev mailing list