Hi all.
Importing a dtm raster assign a correct colour table to it.
If I load it with r.external, instead, only a greyscale is applied. This happens through the qgis plugin, do not know if it's the same with other interfaces).
Is this a known issue?
All the best.
On Thu, Feb 23, 2012 at 12:03 PM, Paolo Cavallini <cavallini@faunalia.it> wrote:
Hi all.
Importing a dtm raster assign a correct colour table to it.
Which format do you have? For example, GeoTIFF has only limited color table
support.
If I load it with r.external, instead, only a greyscale is applied. This
happens through the qgis plugin, do not know if it's the same with other
interfaces).
out=test
WARNING: Datum <Not_specified_based_on_Clarke_1866_ellipsoid> not
recognised by GRASS and no parameters found
Projection of input dataset and current location appear to match
Importing band 1 of 1...
Link to raster map <test> created
On Thu, Feb 23, 2012 at 12:03 PM, Paolo Cavallini<cavallini@faunalia.it> wrote:
Hi all.
Importing a dtm raster assign a correct colour table to it.
If I load it with r.external, instead, only a greyscale is applied.
Do you use r.colors?
This happens through the qgis plugin, do not know if it's the same with other
interfaces).
Is this a known issue?
I tried in GRASS:
# quick and dirty test:
GRASS 6.4.3svn (latlong_wgs84):~/data/maps/fao_forest_fra2000/frst_gez
Sorry I was unclear: importing the map results in an automatically nicely coloured map, whereas r.external results in a greyscale. Apparently r.in.gdal applies automatically an appropriated colour map, r.external does not.
All the best.
> 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)
On Fri, Feb 24, 2012 at 9:24 AM, Hamish <hamish_b@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)
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)
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).