[GRASS-user] rasters loaded with r.external miss a colour table?
Glynn Clements
glynn at gclements.plus.com
Fri Feb 24 04:33:46 EST 2012
Hamish wrote:
> 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)
Note that r.in.gdal behaves similarly: if the input file lacks a
colour table, it creates a 0..255 grey-scale table for GDT_Byte, and a
range-based grey-scale table for GDT_UInt16.
It may be desirable to keep the two consistent. OTOH, r.in.gdal has a
longer history than r.external (i.e. it's more likely that someone is
relying upon the existing behaviour of r.in.gdal than is the case for
r.external).
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list