Glynn, thanks for your answer. But, for instance in GUI if a select a type of color table and then I decide to user a rule file, there is no blank option in "Type of color table". And if I choose rule, it gets an error. So, in this cases I just have to close r.colors window and open one again. This may sound a bit unclear .<div>
<br></div><div>But thanks</div><div>Pedro<br><div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
> I'm reading r.colors manual webpage (<br>
> <a href="http://grass.itc.it/grass64/manuals/html64_user/r.colors.html" target="_blank">http://grass.itc.it/grass64/manuals/html64_user/r.colors.html</a>) and I have a<br>
> few questions related with defining new color tables.<br>
> 1- At color (in Parameters) one of the options is rules. But if i select<br>
> rules and insert a path to a rules file I get this error:<br>
> *ERROR: "color", "rules", and "raster" options are mutually exclusive*<br>
><br>
> *<br>
> *<br>
><br>
> Was this suppose to happen?<br>
<br>
</div>Yes. If you specify a file for "rules", the "color" option should be<br>
blank.<br>
<br>
[color=rules exists for compatibility with previous versions, and only<br>
works from the command-line, not the GUI.</blockquote><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
> 2- About color tables with absolute values (e.g. NDVI) if a NDVI pixel has<br>
> value between 2 defined values, which color does it get?<br>
<br>
</div>It's interpolated. This is true whether the rules uses absolute values<br>
or percentages (or a mix of both).<br>
<div class="im"><br>
> 3- About aspectcolr*.* To each category a color is assigned (e.g. white,<br>
> yellow bla bla bla). Is there a list of possible colors to assign?<br>
<br>
</div>The list of named colours is:<br>
<br>
white black red green blue yellow magenta cyan aqua grey gray<br>
orange brown purple violet indigo<br>
<br>
You can mix named colours and r:g:b notation freely.<br>
<div class="im"><br>
> 4- Regarding assigning a <a href="http://rules.info" target="_blank">rules.info</a> to a map (as it's demonstrated in the<br>
> same manual page). There are two ways. How come r.colors can use, as an<br>
> input, <a href="http://rules.info" target="_blank">rules.info</a> if it's stated before the r.colors statement.<br>
> cat rules.file | r.colors map=threecats color=rules<br>
<br>
</div>color=rules reads rules from stdin, which in the above example is the<br>
contents of the rules.file via "cat". The following commands will<br>
all achieve the same result:<br>
<br>
cat rules.file | r.colors map=threecats rules=-<br>
r.colors map=threecats color=rules < rules.file<br>
r.colors map=threecats rules=- < rules.file<br>
r.colors map=threecats rules=rules.file<br>
<br>
For reading from a file, the last one is preferable (and is the only<br>
one which will work from the GUI). Beyond that, using rules=- is<br>
preferred to color=rules (apart from anything else, rules=- works in<br>
7.0 while color=rules doesn't; color=rules is only kept in 6.4 for<br>
backwards compatibility).<br>
<br>
The use of "cat file | ..." rather than "... < file" can be easier to<br>
read if you're creating a long pipeline in a script, as it places the<br>
source file at the far left of the command. The following both have<br>
the same effect:<br>
<br>
cat infile | cmd1 | cmd2 | ... | cmdN > outfile<br>
<br>
cmd1 < infile | cmd2 | ... | cmdN > outfile<br>
<br>
but the former is probbably clearer.<br>
<div class="im"><br>
> 5- One last question :) I tried to display the color table associated with a<br>
> raster map layer (d.colortable) but I get the following message:<br>
> Command 'd.colortable' not yet implemented<br>
<br>
</div>Odd; you can try d.legend instead, or use r.mapcalc to create a test<br>
map to which you can assign the colour table.<br>
<font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</font></blockquote></div><br></div></div>