[GRASS-user] A color rules - a little issue

Hi
I have a suggestion about color managment in grass
I just work on couple of maps where I need to prepare custom color schemes (rules). Using the r.colors.rules is slighty (Hmm... rather strongly) uncomfortable.
To omit it I replaced dir colors in ../grass63.cvs/etc/ dir with simlink to dir in my home directory and I create new rule file every time I must experiment with colors.

It is not good solution for two reason:
1) every new grass complilation makes problem with symlink
2) I have over 60 rules files in one directory and the number increase

Is possible to create solution similar to r.reclass.file to use custom color rule file from anywhere in file system?

regards
Jarek

Jarose-Bław Jasiewicz wrote:e-A

I have a suggestion about color managment in grass
I just work on couple of maps where I need to prepare custom color
schemes (rules). Using the r.colors.rules is slighty (Hmm... rather
strongly) uncomfortable.

Have you tried:

  r.colors map=... color=rules < rulesfile

?

To omit it I replaced dir colors in ../grass63.cvs/etc/ dir with simlink
to dir in my home directory and I create new rule file every time I must
experiment with colors.

It is not good solution for two reason:
1) every new grass complilation makes problem with symlink
2) I have over 60 rules files in one directory and the number increase

Is possible to create solution similar to r.reclass.file to use custom
color rule file from anywhere in file system?

If you want to use the above from gis.m, save the attached script as
$GISBASE/etc/gm/script/r.colors.file, and add the following line to
$GISBASE/etc/gm/gmmenu.tcl near the one for r.colors.rules:

    {command {[G_msg "Set colors using rules file"]} {} "r.colors.file" {} -command {execute $env(GISBASE)/etc/gm/script/r.colors.file }}

Or you can make the changes in the source tree (replace
$GISBASE/etc/gm with gui/tcltk/gis.m in the above paths) if you want
them to survive "make install".

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

r.colors.file (1.1 KB)

Thanks, that is exactly what I need...
I hope it will be included in newest cvs...

Thanks
Jarek

19/3/2007, "Glynn Clements" <glynn@gclements.plus.com> napisa³/a:

Jarose-B³aw Jasiewicz wrote:e-A

I have a suggestion about color managment in grass
I just work on couple of maps where I need to prepare custom color
schemes (rules). Using the r.colors.rules is slighty (Hmm... rather
strongly) uncomfortable.

Have you tried:

r.colors map=... color=rules < rulesfile

Yessssss...., so I haven't try :frowning:

?

To omit it I replaced dir colors in ../grass63.cvs/etc/ dir with simlink
to dir in my home directory and I create new rule file every time I must
experiment with colors.

It is not good solution for two reason:
1) every new grass complilation makes problem with symlink
2) I have over 60 rules files in one directory and the number increase

Is possible to create solution similar to r.reclass.file to use custom
color rule file from anywhere in file system?

If you want to use the above from gis.m, save the attached script as
$GISBASE/etc/gm/script/r.colors.file, and add the following line to
$GISBASE/etc/gm/gmmenu.tcl near the one for r.colors.rules:

  {command {[G_msg "Set colors using rules file"]} {} "r.colors.file" {} -command {execute $env(GISBASE)/etc/gm/script/r.colors.file }}

Or you can make the changes in the source tree (replace
$GISBASE/etc/gm with gui/tcltk/gis.m in the above paths) if you want
them to survive "make install".

--
Glynn Clements <glynn@gclements.plus.com>

Glynn Clements wrote:

> Is possible to create solution similar to r.reclass.file to use
> custom color rule file from anywhere in file system?

If you want to use the above from gis.m, save the attached script as

merged into gui/tcltk/gis.m/script/r.colors.rules in 6.3 CVS.

Hamish