[GRASS-user] rasters loaded with r.external miss a colour table?

Hamish hamish_b at yahoo.com
Fri Feb 24 03:24:58 EST 2012

Paolo wrote:
> > Sorry I was unclear: importing the map results in an automatically
> > nicely coloured map, whereas r.external results in a greyscale.

Markus N wrote:
> Probably r.external is presetting instead a grey-scale color
> table?

yes, it is doing that, see main.c line ~ 340.

if gdal supplies a color table it uses it, otherwise r.external checks
if the map is type GDT_Byte and if so applies the grey255 rules. Or, if
some other data type applies G_make_grey_scale_colors() based on the
range. I would suggest that this be changed to not create any color table
if none is provided. (and so act like other grass modules do in that
case and fall back to rainbow rules)


More information about the grass-user mailing list