[GRASS-user] Label lines

Hi list,
I would like to create some street-name-labels for my street-vector-layer to
use it in ps.map. However, labels are always printed horizontally and not
along the lines of the vector layer. Is it possible to get this done somehow?
I think of the label-functionality of umn-mapserver (it does use the same
libraries or not?).

Any tips, hints or comments are greatly appreciated!

Best,
Wolfgang

wqual wrote:

I would like to create some street-name-labels for my street-vector-layer to
use it in ps.map. However, labels are always printed horizontally and not
along the lines of the vector layer. Is it possible to get this done somehow?

Use v.label -a ("Rotate labels to align with lines") and utilize the
created labels file in ps.map with 'labels' command.

Haven't tried that, but it should work according to *manual*.

Maciek

On Tue, Jan 16, 2007 at 06:32:38PM +0100, we recorded a bogon-computron collision of the <tutey@o2.pl> flavor, containing:

wqual wrote:

> I would like to create some street-name-labels for my street-vector-layer to
> use it in ps.map. However, labels are always printed horizontally and not
> along the lines of the vector layer. Is it possible to get this done somehow?

Use v.label -a ("Rotate labels to align with lines") and utilize the
created labels file in ps.map with 'labels' command.

Haven't tried that, but it should work according to *manual*.

I've tried it, but it often looks horrible, as each character is aligned with
the bit of vector it's nearest --- when the line is very curved it can look
hideous.

There is also a "rotate" option that you can put in the labels file to rotate
a label at a single angle (as opposed to having every character rotated).
You have to edit the labels file (it's a plain text file) and add a rotate
line for each label you want rotated. You also need to add a rotate line
after the text to set the rotation back to 0. So, for example, if your
labels file has a block like:

  east: 380900.627095
  north: 3870533.383491
  xoffset: 5
  yoffset: 7
  ref: center
  font: standard
  color: black
  size: 3
  width: 1
  hcolor: none
  hwidth: 0
  background: none
  border: none
  opaque: yes
  
  text: Label1

you can add a rotate before and after the "text":

  east: 380900.627095
  north: 3870533.383491
  xoffset: 5
  yoffset: 7
  ref: center
  font: standard
  color: black
  size: 3
  width: 1
  hcolor: none
  hwidth: 0
  background: none
  border: none
  opaque: yes
  rotate: -22

  text: Label1
  rotate: 0

This is a laborious process if you have lots of lines, but the only way I
know of to get ps.map to display the labels in any sort of customized way.

The other approach that I've used sometimes is to use ps.map with unmodified
labels files to produce a postscript file, convert the ps file to PDF and then
edit it in Adobe Illustrator to tweak the labels so they actually look nice.
This is a royal pain in the keester, but if I want a finished product that
looks nice I sometimes resort to it.

I'm sure an alternate approach will be suggested involving GMT instead, which
I have never had the time to figure out myself but is said to be a much better
tool for generating pretty maps.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
one trick, rational thinking, but when you're good and crazy, oooh, oooh,
oooh, the sky is the limit!" --- The Tick