[GRASSLIST:2599] Re: [GRASS5] RE: RE: d.area: areas filled with various colors

Eric G. Miller egm2 at jps.net
Wed Oct 24 01:51:00 EDT 2001

I've hacked on a version of d.area to support a greater range of colors
and selective drawing by categories.  It's not as convenient as having
a full color/legend capability, but we can work on that.  At the
moment I'm using the X11 color name database "rgb.txt", but I expect
to allow arbitrary rgb colors as well with something like:

    "fillcolor=rgb(<0-255> <0-255> <0-255>)"

Here's the help output:

GRASS> d.area help

 Obtains area/perimeter information on vector polygons.
          Oops, need to fix that!

 d.area [-f] map=name [fillcolor=name] [linecolor=name]

  -f   Fill all areas with color (cycle through colors)

        map   Name of existing vector map to be displayed
  fillcolor   Color desired for filling polys (X11 color name)
              default: white
  linecolor   Color desired for drawing map (X11 color name)
              default: none
   category   List of area categories to display

Use it like:  d.area map=mymap fill="cyan2" line="grey70" cat=1,2,5,9

At the moment, if the "-f" flag is specified, then it cycles through
the GRASS standard colors (not the X11 ones).

Probably better to use some kind of legend file so the user doesn't
have to specify these things again and again.

Comments, suggestions, flames, ...

I haven't committed the changes, if you're looking for them... Still
need some resolution on this coordinate transformation issue...

Eric G. Miller <egm2 at jps.net>

More information about the grass-dev mailing list