deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.graphics.optimizers
Class LabelOptimizer

java.lang.Object
  extended by org.deegree.graphics.optimizers.AbstractOptimizer
      extended by org.deegree.graphics.optimizers.LabelOptimizer
All Implemented Interfaces:
Optimizer

public class LabelOptimizer
extends AbstractOptimizer

Selects the optimal Labels (graphical representations generated from LabelDisplayElements) with respect to the amount of overlapping.

The labeling and optimization approach uses ideas from papers by Ingo Petzold on automated label placement.

TODO: The handling of rotated labels is currently broken. Don't use rotated LabelDisplayElements with this optimizer at the moment!

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Field Summary
 
Fields inherited from class org.deegree.graphics.optimizers.AbstractOptimizer
mapView, themes
 
Constructor Summary
LabelOptimizer()
          Creates a new instance of LabelOptimizer with no associated Themes.
LabelOptimizer(Theme[] themes)
          Creates a new instance of LabelOptimizer for the given Themes.
 
Method Summary
 void addTheme(Theme theme)
          Adds a Theme to be considered by this Optimizer.
 void optimize(java.awt.Graphics2D g)
          Finds optimized Labels for the registered LabelDisplayElements.
 
Methods inherited from class org.deegree.graphics.optimizers.AbstractOptimizer
setMapView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelOptimizer

public LabelOptimizer()
Creates a new instance of LabelOptimizer with no associated Themes.


LabelOptimizer

public LabelOptimizer(Theme[] themes)
Creates a new instance of LabelOptimizer for the given Themes.

Parameters:
themes -
Method Detail

addTheme

public void addTheme(Theme theme)
Description copied from interface: Optimizer
Adds a Theme to be considered by this Optimizer.

Specified by:
addTheme in interface Optimizer
Overrides:
addTheme in class AbstractOptimizer
Parameters:
theme - Theme to be considered

optimize

public void optimize(java.awt.Graphics2D g)
              throws java.lang.Exception
Finds optimized Labels for the registered LabelDisplayElements.

Parameters:
g -
Throws:
java.lang.Exception

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org