[GRASS-user] Question on v.label - remove overlapping labels

Hi list,
using v.label, I tried to label (streetnames) some lines of my streetnetwork. It works, quite good, but some labels are overlapping. Is there a possibility to avoid overlapping labels?
I used ArcView 3.2 before - there, a dialogue offers the possibility to activate an option "remove overlapping labels". Anything comparable available in GRASS? This would be rather cool...

Best regards,
Wolfgang
--

  *Wolfgang Qual

* *Referat für Gesundheit und Umwelt*
Umweltschutz
Umweltvorsorge
RGU-UW 11

Bayerstraße 28a
80335 München

Telefon +49 - 89 - 233 - 4 77 17
Telefax +49 - 89 - 233 - 4 77 05

http://www.muenchen.de/umweltatlas
uw11.rgu@muenchen.de
Bitte beachten Sie die Hinweise zur elektronischen
Kommunikation mit der Landeshauptstadt München:
http://www.muenchen.de/ekomm

Wolfgang Qual wrote:

using v.label, I tried to label (streetnames) some lines of my
streetnetwork. It works, quite good, but some labels are overlapping.
Is there a possibility to avoid overlapping labels?

There is nothing in the code to protect from that currently.

If you like you can edit the resultant labels file in your favorite text
editor and either remove the offending label by hand, or tweak their
placement with the xoffset and yoffset parameters. AFAIR, units are in
pixels for the display and PostScript points (1/72 inch) for ps.map.

If you have the labels file open for editing next to your grass display,
you can tweak, resave, and d.redraw in a fairly efficient loop.

I used ArcView 3.2 before - there, a dialogue offers the possibility
to activate an option "remove overlapping labels". Anything
comparable available in GRASS? This would be rather cool...

Ideas+patches on how to do that are welcome. Right now it just goes down
the list of features in a serial fashion & isn't aware of where other
labels are placed after it has placed them.

Hamish

What would be the best way to go about this - making each label a dedicated vector object so that Grass becomes 'aware' of the spatial extent of each label? Then define some kind of buffer threshold within no other label can overlap? Sounds like it could be done through scripting, but at huge computational overhead (i.e., v.in.ascii, v.buffer, v.overlay?). I was thinking about trying my hand at this kind of hack, but it would probably be more trouble than it's worth in the end. Usually I can find a workaround by flipping the labels left/right, resizing, etc.

Thoughts?

~ Eric.

-----Original Message-----
From: grassuser-bounces@grass.itc.it
To: Wolfgang Qual
Cc: grassuser@grass.itc.it
Sent: 2/14/2007 5:15 PM
Subject: Re: [GRASS-user] Question on v.label - remove overlapping labels

Wolfgang Qual wrote:

using v.label, I tried to label (streetnames) some lines of my
streetnetwork. It works, quite good, but some labels are overlapping.
Is there a possibility to avoid overlapping labels?

Hamish:

There is nothing in the code to protect from that currently.
Ideas+patches on how to do that are welcome. Right now it just goes down
the list of features in a serial fashion & isn't aware of where other
labels are placed after it has placed them.

Hello Eric, Hamish, list:
could this be interesting for GRASS-developers? UMN Mapserver displays labels without overlapping.
Maybe a possibility to search for a suitable procedure?

Best regards,
Wolfgang

Patton, Eric schrieb:

What would be the best way to go about this - making each label a dedicated vector object so that Grass becomes 'aware' of the spatial extent of each label? Then define some kind of buffer threshold within no other label can overlap? Sounds like it could be done through scripting, but at huge computational overhead (i.e., v.in.ascii, v.buffer, v.overlay?). I was thinking about trying my hand at this kind of hack, but it would probably be more trouble than it's worth in the end. Usually I can find a workaround by flipping the labels left/right, resizing, etc.

Thoughts?

~ Eric.

-----Original Message-----
From: grassuser-bounces@grass.itc.it
To: Wolfgang Qual
Cc: grassuser@grass.itc.it
Sent: 2/14/2007 5:15 PM
Subject: Re: [GRASS-user] Question on v.label - remove overlapping labels

Wolfgang Qual wrote:
  

using v.label, I tried to label (streetnames) some lines of my streetnetwork. It works, quite good, but some labels are overlapping.
Is there a possibility to avoid overlapping labels?
    
Hamish:
  
There is nothing in the code to protect from that currently.
Ideas+patches on how to do that are welcome. Right now it just goes down
the list of features in a serial fashion & isn't aware of where other
labels are placed after it has placed them.
    
_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--

  *Wolfgang Qual

* *Referat für Gesundheit und Umwelt*
Umweltschutz
Umweltvorsorge
RGU-UW 11

Bayerstraße 28a
80335 München

Telefon +49 - 89 - 233 - 4 77 17
Telefax +49 - 89 - 233 - 4 77 05

http://www.muenchen.de/umweltatlas
uw11.rgu@muenchen.de
Bitte beachten Sie die Hinweise zur elektronischen
Kommunikation mit der Landeshauptstadt München:
http://www.muenchen.de/ekomm