[Geotiff] Geotiff List: Tool to convert 8-bit gray to RGBA using a custom color table?
Jeff Bullard
jeffbullard2000 at yahoo.com
Sun Feb 15 17:17:16 EST 2009
Thanks for the reply. I wrote a short C program using libpng to accomplish the task. The projection information was lost but that's OK since all my images are EPSG 4326 (lat/long WGS84) as required for Google Earth KML. Extent information was preserved in the final png image which was a surprise.
Too bad KML doesn't support this because it would allow the user to change the color table on-the-fly to get better contrast in some weather features.
________________________________
From: Chris 'Xenon' Hanson <xenon at 3dnature.com>
To: Jeff Bullard <jeffbullard2000 at yahoo.com>; "Geotiff at lists.maptools.org >> GeoTIFF Mailing List" <geotiff at lists.maptools.org>
Sent: Sunday, February 15, 2009 12:04:49 PM
Subject: Re: [Geotiff] Geotiff List: Tool to convert 8-bit gray to RGBA using a custom color table?
Jeff Bullard wrote:
> GeoTIFF list,
> I have weather data that is represented as an 8-bit GeoTIFF with one
> band (grayscale). I would like to use a color table to convert into
> RGBA for map display.
> Are there any existing tools to do this? I use a linux platform with
> FWTools for most of my work.
> Previously I used Mapserver and a mapfile to render single-band raster
> into a color map. Now I'm trying Google Earth API to display the same
> maps. I'm new at KML and have found no way to use KML to do simple
> color mapping that my current mapfiles perform, which is to render the
> grayscale into 6 shades of blue. I'm hoping to use some GDAL utility to
> convert the grayscale GeoTIFFs into RGBA using a color table stored in a
> file. I haven't found a way to do it.
> My other alternative is to write some code in C using libtiff and/or
> libpng to perform the color operations. Before I get into that I want
> to ask the list f there is a simple way to do it using existing tools.
I don't think KML can do it. You might be able to do it with a combination of netpbm
(which I think can colorize a greyscale) and fwtools (to capture the metadata before
netpbm and reinsert it afterward).
> Thanks,
> Jeff Bullard
--
Chris 'Xenon' Hanson | Xenon @ 3D Nature | http://www.3DNature.com/
"I set the wheels in motion, turn up all the machines, activate the programs,
and run behind the scenes. I set the clouds in motion, turn up light and sound,
activate the window, and watch the world go 'round." -Prime Mover, Rush.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/geotiff/attachments/20090215/cc766a27/attachment.htm
More information about the Geotiff
mailing list