[GRASS-user] r.out.gmt -- color palette with gaps?

Dylan Beaudette dylan.beaudette at gmail.com
Wed Feb 20 00:35:49 EST 2008


On Tuesday 19 February 2008 11:00:58 am Carlos "Guâno" Grohmann wrote:
> Hi all.
> I have this color shaded relief map created with r.his and
> r.composite. I want to use it as a base map in GMT, sou I went to the
> AddOns page to get the r.out.gmt script, which creates the color
> palette (.cpt) for me. But when I try to create the map with GMT, I
> get this msg:
>
>
> guano at eclipse$ grdimage america_sul_srtm30plus_shade_color.grd -JM15c
> -R-56/-34/-26/0 -Camerica_sul_srtm30plus_shade_color.cpt > amsul.ps
>
> grdimage: GMT Fatal Error: Color palette table
> america_sul_srtm30plus_shade_color.cpt has gaps - aborts!
>
>
> I remember using this script a while ago, and it worked fine..
>
> thanks for any hint.
>
> Carlos

Hi Carlos,

I have noticed these type of difficulties involved with CPT files and rasters 
with a large (and possible complex) color mapping.

A simple solution I found was to export the red, green, blue channels of your 
image (instead of feeding them to r.composite).

Then I use grdimage with the R,G,B grids as inputs:

grdimage $output_raster.red.grd  $output_raster.green.grd 
$output_raster.blue.grd ...

Not sure if it would help, but the attached script (not sure how out of sync 
with r.out.gmt it is...) may help.

Cheers,

Dylan


-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
-------------- next part --------------
A non-text attachment was scrubbed...
Name: template.sh
Type: application/x-shellscript
Size: 16804 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20080219/91675b5d/template-0001.bin


More information about the grass-user mailing list