[GRASSLIST:61] Re: d.rgb question
Glynn Clements
glynn.clements at virgin.net
Fri May 16 18:03:21 EDT 2003
Kirk R. Wythers wrote:
> > You need to set the colors to grey scale for the three maps test.1,
> > test.2 and test3.
> >
> > ie. r.colors map=test.1 golor=gray
> > etc
Actually, you should use color=rules, e.g.
GRASS:~ > r.colors map=test.1 color=rules
Enter rules, "end" when done, "help" if you need it.
Data range is 0 to 255
> 0 black
> 255 white
> end
Color table for [test.1] set to rules
This will ensure that 0 is black and 255 is white.
Using color=gray will map the lowest existing category to black and
the highest existing category to white; if the map doesn't use the
entire 0-255 range, you will get the wrong result.
Also, you can read the rules from a file with e.g.
r.colors map=test.1 color=rules < gray.rules
where gray.rules contains:
0 black
255 white
end
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list