[GRASS-dev] r.colors

Michael Barton michael.barton at asu.edu
Thu Feb 1 00:47:28 EST 2007


This is exactly how I was envisioning it. This makes it relatively easy to
occasionally add to or change the default color tables that ship with GRASS,
and also makes it easier for a user to access their own custom color tables.

Michael


On 1/31/07 8:10 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Hamish wrote:
> 
>>> Since we're talking about color rules, I should mention that it is
>>> confusing to users to have 2 lists of predefined color tables show up
>>> in the r.colors GUI. I know what the difference is, but it is not
>>> obvious to most users. Since these additional rules files have been
>>> accompanying GRASS for a couple years now how about...
>>> 
>>> 1. we include these color rules in the list of predefined color
>>> tables, and 2. change the second list to a browse function where a
>>> user could easily input her/his own color rules file without having to
>>> use a redirect from the command line.
>> 
>> note that the second list (rules=) doesn't allow grey.eq, grey.log.
>> 
>> can the file browser be told to start out in $GISBASE/etc/colors?
>>  (I'm pretty sure I already know the answer for TclTk: "no")
>> 
>> rules= files are easier to add and maintain, the only thing colors= has
>> going for it is the rules can be little programs, and long time
>> backwards compatitbility.
> 
> FWIW, my original plan was to change the color= option to use the
> files once it had been tested and we had figured out how to deal with
> the special cases (grey.eq, grey.log). Somewhere along the line, I
> forgot about it.
> 
>> I guess the other option is a new rulesfile= file browser option to load
>> custom rules, but I think your point was to reduce complexity :)
>> Perhaps that's better for a wrapper script that pipes the input file
>> into r.colors.
>> 
>> FWIW r.colors will take rules interactively if you start it with:
>> 
>> GRASS> r.colors map_name color=rules
> 
> I suggest adding a file= option; this would imply color=rules and read
> the rules from a named file rather than stdin. The only differences
> between this and rules= are:
> 
> 1. rules= requires that the rules file reside in $GISBASE/etc/colors,
> and
> 2. rules= has a list of valid options, while file= would accept any
> filename.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list