[GRASS-user] FCELL, Float32 and colors

Glynn Clements glynn at gclements.plus.com
Fri Jan 4 06:49:17 EST 2008


G. Allegri wrote:

> I have an FCELL raster that I need to export it to distribute it on a
> webgis. I've used r.out.gdal to produce a Float32 Geotiff (to mantain the
> original floating values), but I've lost my color table, as gdal cannot
> associate a LUT to a 32 bit output. The result is a grey scaled image.
> 
> Is there a way to change the color table of a 32 bit image? I would need to
> use my predefined color ramp, and make Mapserver output the colored raster
> with the original values.
> Otherwise I have to export as Byte, but I loose the original pixel values...

This is a limitation of the data format rather than the software. I'm
not aware of any "image" format which supports GRASS-style colour
tables (IIRC, GDAL can embed the GRASS colour table in a private
chunk, but I'm not aware of any software which can make use of that
data).

One possibility is to export the data as two separate files, one
containing the floating-point data and the other a normal RGB image.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list