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

Markus Neteler neteler at osgeo.org
Fri Feb 24 03:34:05 EST 2012

On Fri, Feb 24, 2012 at 9:24 AM, Hamish <hamish_b at yahoo.com> wrote:
> 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)

+1 (then it becomes again the "least surprise" approach)


More information about the grass-user mailing list