How does 'd.rgb' work?
jinn at uhunix.uhcc.Hawaii.Edu
Tue Mar 3 12:03:46 EST 1992
I was trying to display an elevation map in color with a shadow
releif map in grey tone. I have tried 'd.his' using elevation
as hue and shadow relief as intensity. It looks OK only if I stay
far enough; the display is somehow noisy with many pixels of
different colors scattering arround.
I have also tried 'blend.sh' to combine elevation and shadow
relief maps. What the 'blend.sh' script does is to grab the
R,G,B values of each map separately, add them together, and
store the added R,G,B values into three new raster files, i.e.
file.r, file.g, and file.b. Following this, I tried 'd.rgb' command
with the three raster files as input for red, green, and blue.
The result does not look right. It does not hold the original colors
of elevation and does not have any apparent pattern.
To test the performance of 'd.rgb', I extracted the R, G,
and B values of the elevation map using:
r.mapcalc ele.r = r#elevation
r.mapcalc ele.g = g#elevation
r.mapcalc ele.b = b#elevation
and then run 'd.rgb', using ele.r, ele.g, ane ele.b as input
for the r,g,b values. I was expecting the result would be
identical to the result of 'd.rast elevation', but it is
not. The display does not look like the elevation map at all.
I've checked the manual and it seems to me that 'd.rgb' will not
display the values from the individual R, G, B files; rather,
it will take averages of them, therefore the RGB values displayed
by 'd.rgb'are different from the original RGB values defined
in the color table of elevation.
So, how can I display a map using its RGB values?
Does any netter have similar experience on these problem?
Any advice on 'd.rgb', 'd.his', and map overlay will
GIS & Computer Cart. Lab
University of Hawaii at Manoa
More information about the grass-user