org.geotools.renderer.style
Class SLDStyleFactory

java.lang.Object
  extended byorg.geotools.renderer.style.SLDStyleFactory

public class SLDStyleFactory
extends java.lang.Object

Factory object that converts SLD style into rendered styles. DJB: I've made a few changes to this. The old behavior was for this class to convert tags to tags. (ie. there never was a LinePlacement option) This is *certainly* not the correct place to do this, and it was doing a very poor job of it too, and the renderer was not expecting it to be doing it! I added support in TextStyle3D for this and had this class correctly set Line/Point placement selection. NOTE: PointPlacement is the default if not present.

Author:
aaime, dblasby

Constructor Summary
SLDStyleFactory()
           
 
Method Summary
 Style2D createDynamicStyle(Feature f, Symbolizer symbolizer, javax.media.jai.util.Range scaleRange)
          Creates a rendered style
 Style2D createStyle(Feature f, Symbolizer symbolizer, javax.media.jai.util.Range scaleRange)
           Creates a rendered style Makes use of a symbolizer cache based on identity to avoid recomputing over and over the same style object and to reduce memory usage.
protected  java.awt.Composite getComposite(Fill fill, Feature feature)
          Computes the Composite equivalent to the opacity in the SLD Fill
 double getHitRatio()
           
 long getHits()
           
 double getMapScaleDenominator()
          Getter for property mapScaleDenominator.
protected  java.awt.Paint getPaint(Fill fill, Feature feature)
           
 long getRequests()
           
 java.awt.TexturePaint getTexturePaint(Graphic gr, Feature feature)
          DOCUMENT ME!
static int lookUpCap(java.lang.String capType)
          DOCUMENT ME!
static int lookUpJoin(java.lang.String joinType)
          DOCUMENT ME!
 void setMapScaleDenominator(double mapScaleDenominator)
          Setter for property mapScaleDenominator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SLDStyleFactory

public SLDStyleFactory()
Method Detail

getHitRatio

public double getHitRatio()

getHits

public long getHits()

getRequests

public long getRequests()

createStyle

public Style2D createStyle(Feature f,
                           Symbolizer symbolizer,
                           javax.media.jai.util.Range scaleRange)

Creates a rendered style

Makes use of a symbolizer cache based on identity to avoid recomputing over and over the same style object and to reduce memory usage. The same Style2D object will be returned by subsequent calls using the same feature independent symbolizer with the same scaleRange.

Parameters:
f - The feature
symbolizer - The SLD symbolizer
scaleRange - The scale range in which the feature should be painted according to the symbolizer
Returns:
A rendered style equivalent to the symbolizer

createDynamicStyle

public Style2D createDynamicStyle(Feature f,
                                  Symbolizer symbolizer,
                                  javax.media.jai.util.Range scaleRange)
Creates a rendered style

Parameters:
f - The feature
symbolizer - The SLD symbolizer
scaleRange - The scale range in which the feature should be painted according to the symbolizer
Returns:
A rendered style equivalent to the symbolizer
Throws:
java.lang.UnsupportedOperationException - if an unknown symbolizer is passed to this method

getPaint

protected java.awt.Paint getPaint(Fill fill,
                                  Feature feature)

getComposite

protected java.awt.Composite getComposite(Fill fill,
                                          Feature feature)
Computes the Composite equivalent to the opacity in the SLD Fill

Parameters:
fill -
feature -
Returns:

getTexturePaint

public java.awt.TexturePaint getTexturePaint(Graphic gr,
                                             Feature feature)
DOCUMENT ME!

Parameters:
gr - DOCUMENT ME!
feature - DOCUMENT ME!
Returns:
DOCUMENT ME!

lookUpJoin

public static int lookUpJoin(java.lang.String joinType)
DOCUMENT ME!

Parameters:
joinType - DOCUMENT ME!
Returns:
DOCUMENT ME!

lookUpCap

public static int lookUpCap(java.lang.String capType)
DOCUMENT ME!

Parameters:
capType - DOCUMENT ME!
Returns:
DOCUMENT ME!

getMapScaleDenominator

public double getMapScaleDenominator()
Getter for property mapScaleDenominator.

Returns:
Value of property mapScaleDenominator.

setMapScaleDenominator

public void setMapScaleDenominator(double mapScaleDenominator)
Setter for property mapScaleDenominator.

Parameters:
mapScaleDenominator - New value of property mapScaleDenominator.


Copyright © GeoTools. All Rights Reserved.