[GRASS5] Re: [GRASSLIST:8281] Re: Making road maps

Hamish hamish_nospam at yahoo.com
Thu Sep 15 06:21:30 EDT 2005


> > > 2. Is it possible to rotate the names/labels for my north/south
> > > streets 90 degrees from the east/west streets?
..
> Paint Labels: (improved version in grass 6.1-cvs, not in 6.0.1)
> 
> v.label -a
> ps.map, labels instruction
> 
> will align names along vector lines. Fine tune by editing the offsets
> in the $MAPSET/paint/labels/$LABELS_FILE in a text editor. This should
> work really well.

I've just updated v.labels in CVS to give you control over if the name
will curl along the line or just align with it. Also now if you use the
fontsize option it will determine the space option automatically *from
the current display window* (sorry, space must be in map units, no other
way to do it I can see). Space is needed for curled labels.

If using just the size option (map units), then be sure that the 
space option is roughly the same (curled labels only).

The curling code could still use a little tweaking if someone feels keen.


> For the normal display monitor, d.paint.labels doesn't respect the
> rotatation setting that v.label figures out & so it just draws the
> labels horizontally*, but you could write a shell script that could do
> it by parsing the labels file & feeding into 
> 'd.text.freetype text= rotation=' for each feature in a loop. 
> This would be a really great script to have available on the GRASS
> Wiki add-ons page.... fame and fortune could be yours.
> 
> [*] I have just found that we have R_text_rotation() in the raster
> library.. perhaps d.paint.labels could be adapted! I will give it a
> try. I am not sure if d.font.freetype would still work to make pretty
> fonts, but I hope so.

Yup, it works. Will clean it up & commit the change tomorrow.
Does funny things when using a freetype font though.


Hamish




More information about the grass-dev mailing list