[GRASSLIST:10574] Re: Labels and ps.map

Hamish hamish_nospam at yahoo.com
Sat Feb 25 20:49:31 EST 2006


Hi Nick,

> and ps.map has to rely on the - I assume, somewhat outdated - method
> of using a separate label file? Currently, to get labels to come out
> correctly in ps.map, I have to run ps.map, look at the postscript
> output, find that the labels are a bit too big or something, make a
> whole new label file with different parameters, and start again; and
> this usually takes a number of iterations. 

v.label + friends are your best bet.

v.label works quite well for creating & customizing labels:
  http://grass.itc.it/grass61/manuals/html61_user/v.label.html

This creates a labels text file which you can tweak with any text editor.

e.g. font size based on city population: 
v.extract where="pop>100000" out=city
v.label city fontsize=14
v.extract where="pop>100000" out=town
v.label city fontsize=10

then cat both label files together or use two display commands in series.
or trade v.extract for 'grep -A'


d.labels (nee d.site.labels) works quite well for displaying them*, although
note that placement is slightly different between d.labels and ps.map's labels
command- offset is in screen pixels not PostScript units (aka points or 1/72"
on the page). Results are similar though. Do modify the offset values, not the
northing and easting.

[*] have labels file open in another window, tweak&save, then d.redraw

that should get you close so when you use ps.map's "labels" instruction the
results should be nearly perfect.


All these commands are updated and working well in GRASS 6.1 (AFAICT), and are
all somewhat flaky in GRASS 6.0. I'll try and fix any remaining bugs you find
in the devel version, but probably not quickly as while I'm back on dry land
now I'm still away from the office for a wee while more.


As v.label's long option list shows, there are too many controls (IMO) to
simply add all that functionality to the ps.map vpoints instruction set.



regards,
Hamish


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the grass-user mailing list