[GRASS5] Re: rules in r.colors
Hamish
hamish_nospam at yahoo.com
Sun May 16 20:49:39 EDT 2004
> > With the new rules code you did, it is possible to read in text
> > files of color rules. I was suggesting to use this same code to
> > access user-defined files rather than a limited set of color table
> > files located in the $GISBASE/etc/colors folder. It is indeed a
> > different objective than yours was.
>
> Right. So it should be a separate option, e.g. "file=".
Another solution (which I'm not endorsing here, just pointing out) is to
use a flag to specify the rules file is local file.
eg non-functional pseudo-code:
if(flag_local->answer)
strcpy(filename, opt_rules->answer);
else {
strcpy(filename, "$GISBASE/etc/colors/");
strcat(filename, opt_rules->answer);
}
fp1 = fopen(filename, "r");
I don't like -l flags as they can be confused with -1 in some fonts.
Hamish
More information about the grass-dev
mailing list