Line Labeling
The Java applet below allows you to input an x-monotone
polygonal chain. It then generates a strip that contains good
candidates for labels placement. The strip baseline will be composed
of line and circle segments. For more information about line labeling
refer to the article A Simple and Efficient Algorithm for
High-Quality Line Labeling (Taylor & Francis, 2000) [html,
pdf].
To input a polygonal chain use
- the left mouse button to set the vertices (except for the final
vertex),
- the right mouse button to set the final vertex, and
- the middle mouse button (or Shift-left button) to undo the previous
vertex.
There are three parameters that you can define using the sliders
in the lower part of the applet:
- epsilon defines the minimum distance between the polygonal
chain and the strip.
- radius defines the maximum strip curvature. Note that
radius must be greater than epsilon.
- height defines the height of the strip.
If you have set everything, use the button Compute Strip
to get the initial strip. As soon as the initial strip has been
computed, there are more buttons available:
- Refine Strip allows you to refine the strip.
- Clear Strip will do the obvious.
- Min Curve and Min Wiggle will give you a postscript
file where the label "Polygonzugbeschriftung" is placed within the
current strip. While Min Curve will find a position that
minimizes the label curvature, Min Wiggle will find a label
position that minimizes the number of strip pieces of different
curvature occupied by the label.
After pressing Refine Strip the first time, the button
De-Refine Strip brings you back to the previous refinement
level.
Written
by Lars Knipping.
Ported to Linux using ISO-C++ and addition of proxy support by
Johannes Singler.
Last update:
Oct 14, 2004
.
Back to the
Labeling Homepage
Alexander Wolff