## NAME

d.area - Draws vector areas to the GRASS display
(GRASS Display/Vector Program)

## SYNOPSIS

d.vect.area [-r] map=name [fillcolor=name|R:G:B] [linecolor=name|R:G:B] [catnum=value[,value,...]] [legend=filename|"-"]

### Flags:

-r
  Fill all areas with a randomly selected color from a small color palette, and draw all boundaries in black. The palette is similar to the GRASS named colors, but replaces white and black with other colors.

### Parameters:

map
  Name of existing vector map to be displayed
fillcolor
  Color desired for filling polygons. May be specified as a standard grass color name, or as an RGB triplet (e.g. 80:198:255). Fill can be disabled by specifying a color of "none".
  Default: white
linecolor
  Color desired for drawing area boundaries. May be specified as a standard grass color name, or as an RGB triplet (e.g. 127:127:127). Line drawing can be disabled by specifying a color of "none".
  Default: black
catnum
  List of category numbers to restrict which areas are drawn. Ignored if either the -r flag or the legend options are used.
legend
  Name of a legend file specifying what color to use for each category (see below). If "-" is specified, the legend will be read from standard input.
  Default: none

## DESCRIPTION

Use d.vect.area to draw labelled areas from a vector map to the GRASS display. Using, the "-r" flag, the program will cycle through a small color palette, overriding any fillcolor or linecolor argument. If a legend file is specified, it will be used. Otherwise, the color used for filling areas is as specified.

The fillcolor argument may be any of the standard named GRASS colors, or and RGB (red, green, blue) triplet. An RGB triplet must have the form <num>:<num>:<num> where num is between 0 and 255. If "none" is specified, no fill will be done. Specifying "none" does not make sense for the random color option, since it always draws lines in black.

The linecolor argument specifies the color to use for drawing area boundary lines. It has the same format as fillcolor, and also accepts the "none" color to disable line drawing.

An optional list of category numbers may be used to restrict which areas are drawn (only valid with the fillcolor and linecolor options).

More control can be had by creating a legend file. At the time of this writing, GRASS does not have any management functions for specifying how vectors should be drawn, so this file must be created by "hand". The easiest way to create such a file, is to copy the category file for the vector map, and edit it to contain color specifications. The format of the legend file is category red green blue [red green blue], with one entry per line. The first RGB color specifies the fill color, while the optional second one specifies the boundary line color. If a category for a map is not included in this file, it will not be drawn unless there is a special "default" entry with a category of -1. Boundary lines are not drawn unless either a boundary color is specified for the category, or there is a default boundary color. Using the keyword "none" for either fillcolor or linecolor in conjunction with a legend will override drawing fill or boundary lines.

Example Legend File
  -1 255 255 255 127 127 127
  1 210 198 168
  5 168 198 220

In the above, all labelled areas will be drawn in white (255, 255, 255) with dark gray boundaries (127, 127, 127) except those labelled as categories 1 or 5. If the "default" entry had been omitted, then only areas labelled 1 or 5 would have been drawn. Since the entries for 1 and 5 don't specify a color for boundary lines, no boundary lines are drawn.

One may place comments on any line in the legend file by starting it with a non-numeric character ('#' is a good choice). Empty lines are ignored.

## NOTES

It is expected that the legend specification aspect of this module will change when an infrastructure for managing vector drawing styles is implemented.

## AUTHOR

Eric G. Miller

Last changed: $Date: 2002/02/25 04:18:52 $