[Gdal-dev] GMT to Geotiff, transform and recolor

Frank Warmerdam warmerdam at pobox.com
Tue Feb 28 23:04:35 EST 2006


Andrea Aime wrote:
> Hi,
> I was wondering if with GDAL I could take a GMT grid file, transform
> it into a GeoTiff, and assign a color table to the values at the same time.
> I have looked at the gdal_translate tool, but it does not seem to support
> re-coloring.
> 
> If not possible with command line tools, would it be possible to perform 
> the operation using the gdal VB6 bindings?

Andrea,

I don't see any way you can do this with just gdal_translate.  As you
note it doesn't have any support for recoloring.  You could do it by
creating an XML VRT file with the color table in it, and then use
gdal_translate to produce a GeoTIFF with palette from the VRT file and
the GMT file it points to.

Alternatively you could accomplish it from VB6 using the VB6 bindings
of GDAL.

Let me know if you need details on how to construct the VRT.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list