[GRASS-dev] [bug #4917] (grass) ps.map: legend of vpoints sizes

Moritz Lennert mlennert at club.worldonline.be
Mon Jul 31 06:20:22 EDT 2006


Request Tracker wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4917 
> -------------------------------------------------------------------------
> 
> 
> Subject: ps.map: legend of vpoints sizes
> 
> Platform: GNU/Linux/x86 grass obtained from: CVS grass binary for
> platform: Compiled from Sources GRASS Version: cvs_head_20060724
> 
> The sizecol option of the vpoints command in ps.map allows to make
> the point symbols' size vary with the value of an attribute column. 
> It would be great if there was some sort of legend command which
> would allow to create a legend of these circle sizes. It would mean
> taking the icon and scale from the vpoints command, applying the
> desired legend values and positioning this legend somewhere, plus the
> normal text options for the legend text.
> 

Still thinking of how to implement this best, I am thinking along the 
following lines:

- add an lvalues option to the vpoints command which would take the 
values for which one would like to draw symbols in the legend:

i.e.: lvalues 500,2500,10000

- modify lines 216-216 in ps/ps.map/ps_vlegend.c so that it draws as 
many symbols as needed

Does this general idea sound reasonable, or should such a legend be 
drawn separately from the vlegend ?

Issues that need to be solved:

- should the symbols be drawn inside each other (easy for circles, but 
maybe not for others) ?
- if they are not inside each other should they be next to each other or 
one above the other
- if the latter, then each should probably be registered seperately in 
vec[][] / nvec[]
- how to deal with the text: draw lines from symbols to (small) text, 
write values next to each other in the same order as the symbols, e.g.: 
o O 10 50

Hamish, as you are the ps.map expert, what do you think ?

Moritz




More information about the grass-dev mailing list