[GRASS5] GRASS 5.7: d.vect with individual area fill colors

Markus Neteler neteler at itc.it
Tue Sep 16 12:04:52 EDT 2003


Hi,

for (my) amusement I have implemented individual area fill vector colors
in d.vect (new -a flag):

d.vect -a map=testisola type=centroid,area display=attr attrcol=label lcolor=black

http://mpa.itc.it/markus/grass51/dvect/dvect57_areacolor.jpg

With '-a' every area is filled depending on the category number.
The table for the map above looks like this:

echo "select * from testisola" | db.select
cat|label|GRASSRGB
0|no data|
90|FRASSILONGO|23:245:67
104|LEVICO|23:145:67
139|PERGINE VALSUGANA|223:45:237
168|SANT'ORSOLA|223:45:67
190|TENNA|123:45:67

To change a color, run something like
echo "update testisola set GRASSRGB='123:45:237' where cat=139" | db.execute

If I find the time, I'll do the same for vector lines in d.vect.

We may decide now if approach to use a extra color column is good,
or/and v.colors similar to r.colors with a rules file should be
accepted.

Cheers

 Markus




More information about the grass-dev mailing list