deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.graphics.sld
Class StyleFactory

java.lang.Object
  extended by org.deegree.graphics.sld.StyleFactory

public class StyleFactory
extends Object

An utility class designed to easy creation of style by convinience methods.

Author:
Andreas Poth

Constructor Summary
StyleFactory()
           
 
Method Summary
static CssParameter createCssParameter(String name, double value)
          creates a CssParameter with a name and a value
static CssParameter createCssParameter(String name, int value)
          creates a CssParameter with a name and a value
static CssParameter createCssParameter(String name, String value)
          creates a CssParameter with a name and a value
static ExternalGraphic createExternalGraphic(String uri, String format)
          wrapper for stylefactory method
static ExternalGraphic createExternalGraphic(URL url, String format)
          wrapper for stylefactory method
static FeatureTypeStyle createFeatureTypeStyle(Rule rule)
          create a Feature type styler
static FeatureTypeStyle createFeatureTypeStyle(Rule[] rules)
          create a Feature type styler
static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName, Rule rule)
          create a Feature type styler
static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName, Rule[] rules)
          create a Feature type styler
static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName, String title, String abstract_, String featureTypeName, Rule[] rules)
          create a Feature type styler
static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName, Symbolizer symbolizer)
          create a Feature type styler
static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName, Symbolizer[] symbolizers)
          create a Feature type styler
static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName, Symbolizer[] symbolizers, double minScaleDenominator, double maxScaleDenominator)
          create a Feature type styler see the SLD Spec for more details of scaleDenominators
static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName, Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator)
          create a Feature type styler see the SLD Spec for more details of scaleDenominators
static FeatureTypeStyle createFeatureTypeStyle(Symbolizer symbolizer)
          create a Feature type styler
static FeatureTypeStyle createFeatureTypeStyle(Symbolizer[] symbolizers, double minScaleDenominator, double maxScaleDenominator)
          create a Feature type styler see the SLD Spec for more details of scaleDenominators
static FeatureTypeStyle createFeatureTypeStyle(Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator)
          create a Feature type styler see the SLD Spec for more details of scaleDenominators
static Fill createFill()
          create a default fill 50% gray
static Fill createFill(Color color)
          create a fill of color
static Fill createFill(Color color, double opacity)
          create a fill with the supplied color and opacity
static Fill createFill(Color color, double opacity, GraphicFill fill)
          create a fill with color and opacity supplied and uses the graphic fill supplied for the fill
static Font createFont(Font font)
          create a geotools font object from a java font
static Font createFont(String fontFamily, boolean italic, boolean bold, double fontSize)
          create font of supplied family, size and weight/style
static Font createFont(String fontFamily, double fontSize)
          create font of supplied family and size
static Graphic createGraphic(ExternalGraphic externalGraphic, Mark mark, double opacity, double size, double rotation)
          creates a graphic object
static GraphicFill createGraphicFill(Graphic graphic)
          creates a GraphicFill from a Graphic object
static GraphicStroke createGraphicStroke(Graphic graphic)
          creates a GraphicStroke from a Graphic object
static Halo createHalo()
          wrapper round StyleFactory method to create default halo
static Halo createHalo(Color color, double radius)
          wrapper round StyleFactory method to create halo
static Halo createHalo(Color fillColor, double opacity, Color strokeColor, double radius)
          wrapper round StyleFactory method to create halo
static Halo createHalo(Fill fill, Stroke stroke, double radius)
          wrapper round StyleFactory method to create halo
static LabelPlacement createLabelPlacement(LinePlacement linePlacement)
          creates a label placement that is orientated on a line
static LabelPlacement createLabelPlacement(PointPlacement pointPlacement)
          creates a label placement that is orientated on a point
static LinePlacement createLinePlacement(double offset)
          creates a LinePlacement with a user defined distance between the labels and the lines.
static LinePlacement createLinePlacement(double offset, double lineWidth, int gap)
          creates a LinePlacement with a user defined distance between the labels and the lines.
static LinePlacement createLinePlacement(String position)
          creates a LinePlacement with a relative position of the label according to the line the lines.
static LinePlacement createLinePlacement(String position, double lineWidth, int gap)
          creates a LinePlacement with a user defined distance between the labels and the lines.
static AbstractStyle createLineStyle(Color startColor, Color endColor, double startWidth, double endWidth, double opacity, double min, double max, String featurePropertyName, int numberOfSteps)
          Throws an UnsupportedOperationException, but should create a style with name 'defaultLine' for rendering line geometries.
static AbstractStyle createLineStyle(Color color, double width, double opacity, double min, double max)
          creates a style with name 'defaultLine' for rendering line geometries
static LineSymbolizer createLineSymbolizer()
          create a default line symboliser
static LineSymbolizer createLineSymbolizer(Color color)
          create a LineSymbolizer
static LineSymbolizer createLineSymbolizer(Color color, double width)
          create a LineSymbolizer
static LineSymbolizer createLineSymbolizer(Color color, double width, PropertyPath geometryPropertyName)
          create a LineSymbolizer
static LineSymbolizer createLineSymbolizer(double width)
          create a new line symbolizer
static LineSymbolizer createLineSymbolizer(Stroke stroke)
          create a LineSymbolizer
static LineSymbolizer createLineSymbolizer(Stroke stroke, PropertyPath geometryPropertyName)
          create a LineSymbolizer
static LineSymbolizer createLineSymbolizer(Stroke stroke, PropertyPath geometryPropertyName, double min, double max)
          create a LineSymbolizer
static Mark createMark(String wellKnownName)
          create the named mark
static Mark createMark(String wellKnownName, Color fillColor)
          create a mark of the supplied color and a default outline (black)
static Mark createMark(String wellKnownName, Color fillColor, Color borderColor, double borderWidth)
          create the named mark with the colors etc supplied
static Mark createMark(String wellKnownName, Color borderColor, double borderWidth)
          create a mark with default fill (50% gray) and the supplied outline
static Mark createMark(String wellKnownName, Fill fill, Stroke stroke)
          create a mark with the supplied fill and stroke
static ParameterValueType createParameterValueType(double value)
          creates a ParameterValueType instance with a String as value
static ParameterValueType createParameterValueType(Expression[] expressions)
          creates a ParameterValueType instance with an array of Expression s as value
static ParameterValueType createParameterValueType(int value)
          creates a ParameterValueType instance with a int as value
static ParameterValueType createParameterValueType(String value)
          creates a ParameterValueType instance with a String as value
static PointPlacement createPointPlacement()
          wrapper round Stylefactory Method
static PointPlacement createPointPlacement(double anchorX, double anchorY, double rotation)
          wrapper round Stylefactory Method
static PointPlacement createPointPlacement(double anchorX, double anchorY, double displacementX, double displacementY, double rotation)
          wrapper round Stylefactory Method
static PointPlacement createPointPlacement(double anchorX, double anchorY, double displacementX, double displacementY, double rotation, boolean auto)
           
static AbstractStyle createPointStyle(String[] wellKnownNames, Color startFillColor, Color endFillColor, Color startBorderColor, Color endBorderColor, double startBorderWidth, double endBorderWidth, double opacity, double startSize, double endSize, double rotation, double min, double max, String featurePropertyName, int numberOfSteps)
          Throws an UnsupportedOperationException, but should create a style with name 'defaultPoint' for rendering point geometries.
static AbstractStyle createPointStyle(String wellKnownName, Color fillColor, Color borderColor, double borderWidth, double opacity, double size, double rotation, double min, double max)
          creates a style with name 'defaultPoint' for rendering point geometries
static PointSymbolizer createPointSymbolizer()
          create a default point symbolizer
static PointSymbolizer createPointSymbolizer(Graphic graphic)
          create a point symbolizer
static PointSymbolizer createPointSymbolizer(Graphic graphic, PropertyPath geometryPropertyName)
          create a point symbolizer
static PointSymbolizer createPointSymbolizer(Graphic graphic, PropertyPath geometryPropertyName, double min, double max)
          create a point symbolizer
static AbstractStyle createPolygonStyle(Color startFillColor, Color endFillColor, double fillOpacity, Color startStrokeColor, Color endStrokeColor, double startStrokeWidth, double endStrokeWidth, double strokeOpacity, double min, double max, String featurePropertyName, int numberOfSteps)
          Throws an UnsupportedOperationException, but should create a style with name 'defaultPoint' for rendering point geometries.
static AbstractStyle createPolygonStyle(Color fillColor, double fillOpacity, Color strokeColor, double strokeWidth, double strokeOpacity, double min, double max)
          creates a style with name 'defaultPolygon' for rendering polygon geometries
static PolygonSymbolizer createPolygonSymbolizer()
          create a default polygon symbolizer
static PolygonSymbolizer createPolygonSymbolizer(Color fillColor)
          create a polygon symbolizer
static PolygonSymbolizer createPolygonSymbolizer(Color fillColor, Color borderColor, double borderWidth)
          create a polygon symbolizer
static PolygonSymbolizer createPolygonSymbolizer(Color borderColor, double borderWidth)
          create a polygon symbolizer
static PolygonSymbolizer createPolygonSymbolizer(Stroke stroke, Fill fill)
          create a polygon symbolizer
static PolygonSymbolizer createPolygonSymbolizer(Stroke stroke, Fill fill, PropertyPath geometryPropertyName)
          create a polygon symbolizer
static PolygonSymbolizer createPolygonSymbolizer(Stroke stroke, Fill fill, PropertyPath geometryPropertyName, double min, double max)
          create a polygon symbolizer
static Rule createRule(Symbolizer symbolizer)
          create a simple styling rule
static Rule createRule(Symbolizer[] symbolizers)
          reate a simple styling rule
static Rule createRule(Symbolizer[] symbolizers, double minScaleDenominator, double maxScaleDenominator)
          create a simple styling rule, see the SLD Spec for more details of scaleDenominators
static Rule createRule(Symbolizer[] symbolizers, String name, String title, String abstract_, double minScaleDenominator, double maxScaleDenominator)
          create a simple styling rule, see the SLD Spec for more details of scaleDenominators
static Rule createRule(Symbolizer[] symbolizers, String name, String title, String abstract_, LegendGraphic legendGraphic, Filter filter, boolean elseFilter, double minScaleDenominator, double maxScaleDenominator)
          create a complex styling rule, see the SLD Spec for more details of scaleDenominators
static Rule createRule(Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator)
          create a simple styling rule, see the SLD Spec for more details of scaleDenominators
static TextSymbolizer createStaticTextSymbolizer(Color color, Font[] fonts, String label)
          Throws an UnsupportedOperationException, but should create a textsymbolizer which doesn't change
static TextSymbolizer createStaticTextSymbolizer(Color color, Font font, String label)
          Throws an UnsupportedOperationException, but should create a textsymbolizer which doesn't change
static Stroke createStroke()
          create a default Stroke that black, 1 pixel width, complete opaque, with round linejoin and square line cap
static Stroke createStroke(Color color)
          Create a default stroke with the supplied color
static Stroke createStroke(Color color, double width)
          create a stroke with the passed width and color
static Stroke createStroke(Color color, double width, double opacity)
          create a stroke with color, width and opacity supplied
static Stroke createStroke(Color color, double width, double opacity, float[] dashArray, String lineJoin, String lineCap)
          create a stroke with color, width, linejoin type and lineCap type.
static Stroke createStroke(Color color, double width, float[] dashArray)
          create a dashed line of color and width
static Stroke createStroke(Color color, double width, String lineJoin, String lineCap)
          create a stroke with color, width, linejoin type and lineCap type.
static Stroke createStroke(double width)
          create a default stroke with the supplied width
static AbstractStyle createStyle()
          create a new default style
static AbstractStyle createStyle(String name, String title, String abstract_, FeatureTypeStyle featureTypeStyle)
          create a new style
static AbstractStyle createStyle(String name, String title, String abstract_, FeatureTypeStyle[] featureTypeStyles)
          create a new style
static AbstractStyle createStyle(String name, String title, String abstract_, String featureTypeName, Rule[] rules)
          create a style
static AbstractStyle createStyle(String name, Symbolizer symbolizer)
          create a new style
static AbstractStyle createStyle(String name, Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator)
          create a new style
static AbstractStyle createStyle(Symbolizer symbolizer)
          create a new style
static AbstractStyle createStyle(Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator)
          create a new style with name 'default'
static TextSymbolizer createTextSymbolizer(Color color, Font font, String attributeName, LabelPlacement labelPlacement)
          create a textsymbolizer
static TextSymbolizer createTextSymbolizer(Geometry geometry, ParameterValueType label, Font font, LabelPlacement labelPlacement, Halo halo, Fill fill, double min, double max)
          create a textsymbolizer
static TextSymbolizer createTextSymbolizer(PropertyPath geometryPropertyName, String attribute, Font font, LabelPlacement labelPlacement, Halo halo, Fill fill, double min, double max)
          create a textsymbolizer
static TextSymbolizer createTextSymbolizer(PropertyPath geometryPropertyName, String attribute, LabelPlacement labelPlacement)
          create a textsymbolizer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleFactory

public StyleFactory()
Method Detail

createParameterValueType

public static ParameterValueType createParameterValueType(String value)
creates a ParameterValueType instance with a String as value

Parameters:
value - value of the ParameterValueType
Returns:
the ParameterValueType created

createParameterValueType

public static ParameterValueType createParameterValueType(int value)
creates a ParameterValueType instance with a int as value

Parameters:
value - value of the ParameterValueType
Returns:
the ParameterValueType created

createParameterValueType

public static ParameterValueType createParameterValueType(double value)
creates a ParameterValueType instance with a String as value

Parameters:
value - value of the ParameterValueType
Returns:
the ParameterValueType created

createParameterValueType

public static ParameterValueType createParameterValueType(Expression[] expressions)
creates a ParameterValueType instance with an array of Expression s as value

Parameters:
expressions -
Returns:
the the ParameterValueType created

createCssParameter

public static CssParameter createCssParameter(String name,
                                              String value)
creates a CssParameter with a name and a value

Parameters:
name - name of the css parameter
value - value of the css parameter
Returns:
the CssParameter created

createCssParameter

public static CssParameter createCssParameter(String name,
                                              int value)
creates a CssParameter with a name and a value

Parameters:
name - name of the css parameter
value - value of the css parameter
Returns:
the CssParameter created

createCssParameter

public static CssParameter createCssParameter(String name,
                                              double value)
creates a CssParameter with a name and a value

Parameters:
name - name of the css parameter
value - value of the css parameter
Returns:
the CssParameter created

createGraphicStroke

public static GraphicStroke createGraphicStroke(Graphic graphic)
creates a GraphicStroke from a Graphic object

Parameters:
graphic - GraphicReturns:
the GraphicStroke created

createGraphicFill

public static GraphicFill createGraphicFill(Graphic graphic)
creates a GraphicFill from a Graphic object

Parameters:
graphic - GraphicReturns:
the GraphicFill created

createStroke

public static Stroke createStroke()
create a default Stroke that black, 1 pixel width, complete opaque, with round linejoin and square line cap

Returns:
the Stroke created

createStroke

public static Stroke createStroke(double width)
create a default stroke with the supplied width

Parameters:
width - the width of the line
Returns:
the stroke created

createStroke

public static Stroke createStroke(Color color)
Create a default stroke with the supplied color

Parameters:
color - the color of the line
Returns:
the created stroke

createStroke

public static Stroke createStroke(Color color,
                                  double width)
create a stroke with the passed width and color

Parameters:
color - the color of the line
width - the width of the line
Returns:
the created stroke

createStroke

public static Stroke createStroke(Color color,
                                  double width,
                                  String lineJoin,
                                  String lineCap)
create a stroke with color, width, linejoin type and lineCap type.

Parameters:
color - the color of the line
width - the width of the line
lineJoin - the type of join to be used at points along the line
lineCap - the type of cap to be used at the end of the line
Returns:
the stroke created

createStroke

public static Stroke createStroke(Color color,
                                  double width,
                                  double opacity,
                                  float[] dashArray,
                                  String lineJoin,
                                  String lineCap)
create a stroke with color, width, linejoin type and lineCap type.

Parameters:
color - the color of the line
width - the width of the line
opacity - the opacity or see throughness of the line, 0 - is transparent, 1 is completely drawn
dashArray -
lineJoin - the type of join to be used at points along the line
lineCap - the type of cap to be used at the end of the line
Returns:
the stroke created

createStroke

public static Stroke createStroke(Color color,
                                  double width,
                                  float[] dashArray)
create a dashed line of color and width

Parameters:
color - the color of the line
width - the width of the line
dashArray - an array of floats describing the length of line and spaces
Returns:
the stroke created

createStroke

public static Stroke createStroke(Color color,
                                  double width,
                                  double opacity)
create a stroke with color, width and opacity supplied

Parameters:
color - the color of the line
width - the width of the line
opacity - the opacity or see throughness of the line, 0 - is transparent, 1 is completely drawn
Returns:
the stroke created

createFill

public static Fill createFill()
create a default fill 50% gray

Returns:
the fill created

createFill

public static Fill createFill(Color color)
create a fill of color

Parameters:
color - the color of the fill
Returns:
the fill created

createFill

public static Fill createFill(Color color,
                              double opacity)
create a fill with the supplied color and opacity

Parameters:
color - the color to fill with
opacity - the opacity of the fill 0 - transparent, 1 - completly filled
Returns:
the fill created

createFill

public static Fill createFill(Color color,
                              double opacity,
                              GraphicFill fill)
create a fill with color and opacity supplied and uses the graphic fill supplied for the fill

Parameters:
color - the foreground color
opacity - the opacity of the fill
fill - the graphic object to use to fill the fill
Returns:
the fill created

createMark

public static Mark createMark(String wellKnownName)
create the named mark

Parameters:
wellKnownName - the wellknown name of the mark
Returns:
the mark created

createMark

public static Mark createMark(String wellKnownName,
                              Color fillColor,
                              Color borderColor,
                              double borderWidth)
create the named mark with the colors etc supplied

Parameters:
wellKnownName - the well known name of the mark
fillColor - the color of the mark
borderColor - the outline color of the mark
borderWidth - the width of the outline
Returns:
the mark created

createMark

public static Mark createMark(String wellKnownName,
                              Color borderColor,
                              double borderWidth)
create a mark with default fill (50% gray) and the supplied outline

Parameters:
wellKnownName - the well known name of the mark
borderColor - the outline color
borderWidth - the outline width
Returns:
the mark created

createMark

public static Mark createMark(String wellKnownName,
                              Color fillColor)
create a mark of the supplied color and a default outline (black)

Parameters:
wellKnownName - the well known name of the mark
fillColor - the color of the mark
Returns:
the created mark

createMark

public static Mark createMark(String wellKnownName,
                              Fill fill,
                              Stroke stroke)
create a mark with the supplied fill and stroke

Parameters:
wellKnownName - the well known name of the mark
fill - the fill to use
stroke - the stroke to use
Returns:
the mark created

createExternalGraphic

public static ExternalGraphic createExternalGraphic(String uri,
                                                    String format)
                                             throws MalformedURLException
wrapper for stylefactory method

Parameters:
uri - the uri of the image
format - mime type of the image
Returns:
the external graphic
Throws:
MalformedURLException

createExternalGraphic

public static ExternalGraphic createExternalGraphic(URL url,
                                                    String format)
wrapper for stylefactory method

Parameters:
url - the url of the image
format - mime type of the image
Returns:
the external graphic

createGraphic

public static Graphic createGraphic(ExternalGraphic externalGraphic,
                                    Mark mark,
                                    double opacity,
                                    double size,
                                    double rotation)
creates a graphic object

Parameters:
externalGraphic - an external graphic to use if displayable
mark - a mark to use
opacity - - the opacity of the graphic
size - - the size of the graphic
rotation - - the rotation from the top of the page of the graphic
Returns:
the graphic created

createPointPlacement

public static PointPlacement createPointPlacement()
wrapper round Stylefactory Method

Returns:
the default pointplacement

createPointPlacement

public static PointPlacement createPointPlacement(double anchorX,
                                                  double anchorY,
                                                  double rotation)
wrapper round Stylefactory Method

Parameters:
anchorX - - the X coordinate
anchorY - - the Y coordinate
rotation - - the rotaion of the label
Returns:
the pointplacement created

createPointPlacement

public static PointPlacement createPointPlacement(double anchorX,
                                                  double anchorY,
                                                  double displacementX,
                                                  double displacementY,
                                                  double rotation)
wrapper round Stylefactory Method

Parameters:
anchorX - - the X coordinate
anchorY - - the Y coordinate
displacementX - - the X distance from the anchor
displacementY - - the Y distance from the anchor
rotation - - the rotaion of the label
Returns:
the pointplacement created

createPointPlacement

public static PointPlacement createPointPlacement(double anchorX,
                                                  double anchorY,
                                                  double displacementX,
                                                  double displacementY,
                                                  double rotation,
                                                  boolean auto)
Parameters:
anchorX - - the X coordinate
anchorY - - the Y coordinate
displacementX - - the X distance from the anchor
displacementY - - the Y distance from the anchor
rotation - - the rotaion of the label
auto - - auto positioning of the label
Returns:
the pointplacement created

createLinePlacement

public static LinePlacement createLinePlacement(double offset)
creates a LinePlacement with a user defined distance between the labels and the lines. A positive value indicates a position above the line, a negative value indicates a position below. The line width is asumed to be 2 pixel and the gap between the labels is set to factor 10 of the label width.

Parameters:
offset - - the distance between the line and the label
Returns:
the LinePlacement created

createLinePlacement

public static LinePlacement createLinePlacement(String position)
creates a LinePlacement with a relative position of the label according to the line the lines. The line width is asumed to be 2 pixel and the gap between the labels is set to factor 10 of the label width.

Parameters:
position - of the label relative to the line
Returns:
the LinePlacement created

createLinePlacement

public static LinePlacement createLinePlacement(double offset,
                                                double lineWidth,
                                                int gap)
creates a LinePlacement with a user defined distance between the labels and the lines. A positive value indicates a position above the line, a negative value indicates a position below.

Parameters:
offset - - the distance between the line and the label
lineWidth - - assumed lineWidth
gap - - gap between the labels measured in label width
Returns:
the LinePlacement created

createLinePlacement

public static LinePlacement createLinePlacement(String position,
                                                double lineWidth,
                                                int gap)
creates a LinePlacement with a user defined distance between the labels and the lines. A positive value indicates a position above the line, a negative value indicates a position below.

Parameters:
position - - relative position of the label to the line
lineWidth - - assumed lineWidth
gap - - gap between the labels measured in label width
Returns:
the LinePlacement created

createLabelPlacement

public static LabelPlacement createLabelPlacement(LinePlacement linePlacement)
creates a label placement that is orientated on a line

Parameters:
linePlacement - description of the line where the lable will be orientated on
Returns:
created LabelPlacement

createLabelPlacement

public static LabelPlacement createLabelPlacement(PointPlacement pointPlacement)
creates a label placement that is orientated on a point

Parameters:
pointPlacement - description of the point where the lable will be orientated on
Returns:
created LabelPlacement

createFont

public static Font createFont(Font font)
create a geotools font object from a java font

Parameters:
font - - the font to be converted
Returns:
- the deegree sld font

createFont

public static Font createFont(String fontFamily,
                              double fontSize)
create font of supplied family and size

Parameters:
fontFamily - - the font family
fontSize - - the size of the font in points
Returns:
the font object created

createFont

public static Font createFont(String fontFamily,
                              boolean italic,
                              boolean bold,
                              double fontSize)
create font of supplied family, size and weight/style

Parameters:
fontFamily - - the font family
italic - - should the font be italic?
bold - - should the font be bold?
fontSize - - the size of the font in points
Returns:
the new font object

createHalo

public static Halo createHalo()
wrapper round StyleFactory method to create default halo

Returns:
the new halo

createHalo

public static Halo createHalo(Color color,
                              double radius)
wrapper round StyleFactory method to create halo

Parameters:
color - - the color of the halo
radius - - the radius of the halo use a value <= 0 for rectangle
Returns:
the new halo

createHalo

public static Halo createHalo(Color fillColor,
                              double opacity,
                              Color strokeColor,
                              double radius)
wrapper round StyleFactory method to create halo

Parameters:
fillColor - - the fill color of the halo
opacity - - the opacity of the halo fill 0 - transparent 1 - solid
strokeColor - - the stroke color of the halo
radius - - the radius of the halo use a value <= 0 for rectangle
Returns:
the new halo

createHalo

public static Halo createHalo(Fill fill,
                              Stroke stroke,
                              double radius)
wrapper round StyleFactory method to create halo

Parameters:
fill - - the fill of the halo
stroke - - the stroke of the halo
radius - - the radius of the halo use a value <= 0 for rectangle
Returns:
the new halo

createLineSymbolizer

public static LineSymbolizer createLineSymbolizer()
create a default line symboliser

Returns:
the new line symbolizer

createLineSymbolizer

public static LineSymbolizer createLineSymbolizer(double width)
create a new line symbolizer

Parameters:
width - the width of the line
Returns:
the new line symbolizer

createLineSymbolizer

public static LineSymbolizer createLineSymbolizer(Color color)
create a LineSymbolizer

Parameters:
color - - the color of the line
Returns:
the new line symbolizer

createLineSymbolizer

public static LineSymbolizer createLineSymbolizer(Color color,
                                                  double width)
create a LineSymbolizer

Parameters:
color - - the color of the line
width - - the width of the line
Returns:
the new line symbolizer

createLineSymbolizer

public static LineSymbolizer createLineSymbolizer(Color color,
                                                  double width,
                                                  PropertyPath geometryPropertyName)
create a LineSymbolizer

Parameters:
color - - the color of the line
width - - the width of the line
geometryPropertyName - - the name of the geometry to be drawn
Returns:
the new line symbolizer

createLineSymbolizer

public static LineSymbolizer createLineSymbolizer(Stroke stroke)
create a LineSymbolizer

Parameters:
stroke - - the stroke to be used to draw the line
Returns:
the new line symbolizer

createLineSymbolizer

public static LineSymbolizer createLineSymbolizer(Stroke stroke,
                                                  PropertyPath geometryPropertyName)
create a LineSymbolizer

Parameters:
stroke - - the stroke to be used to draw the line
geometryPropertyName - - the name of the geometry to be drawn
Returns:
the new line symbolizer

createLineSymbolizer

public static LineSymbolizer createLineSymbolizer(Stroke stroke,
                                                  PropertyPath geometryPropertyName,
                                                  double min,
                                                  double max)
create a LineSymbolizer

Parameters:
stroke - - the stroke to be used to draw the line
geometryPropertyName - - the name of the geometry to be drawn
min - min scale denominator
max - max scale denominator
Returns:
the new line symbolizer

createPolygonSymbolizer

public static PolygonSymbolizer createPolygonSymbolizer()
create a default polygon symbolizer

Returns:
the new polygon symbolizer

createPolygonSymbolizer

public static PolygonSymbolizer createPolygonSymbolizer(Color fillColor)
create a polygon symbolizer

Parameters:
fillColor - - the color to fill the polygon
Returns:
the new polygon symbolizer

createPolygonSymbolizer

public static PolygonSymbolizer createPolygonSymbolizer(Color fillColor,
                                                        Color borderColor,
                                                        double borderWidth)
create a polygon symbolizer

Parameters:
fillColor - - the color to fill the polygon
borderColor - - the outline color of the polygon
borderWidth - - the width of the outline
Returns:
the new polygon symbolizer

createPolygonSymbolizer

public static PolygonSymbolizer createPolygonSymbolizer(Color borderColor,
                                                        double borderWidth)
create a polygon symbolizer

Parameters:
borderColor - - the outline color of the polygon
borderWidth - - the width of the outline
Returns:
the new polygon symbolizer

createPolygonSymbolizer

public static PolygonSymbolizer createPolygonSymbolizer(Stroke stroke,
                                                        Fill fill)
create a polygon symbolizer

Parameters:
stroke - - the stroke to use to outline the polygon
fill - - the fill to use to color the polygon
Returns:
the new polygon symbolizer

createPolygonSymbolizer

public static PolygonSymbolizer createPolygonSymbolizer(Stroke stroke,
                                                        Fill fill,
                                                        PropertyPath geometryPropertyName)
create a polygon symbolizer

Parameters:
stroke - - the stroke to use to outline the polygon
fill - - the fill to use to color the polygon
geometryPropertyName - - the name of the geometry to be drawn
Returns:
the new polygon symbolizer

createPolygonSymbolizer

public static PolygonSymbolizer createPolygonSymbolizer(Stroke stroke,
                                                        Fill fill,
                                                        PropertyPath geometryPropertyName,
                                                        double min,
                                                        double max)
create a polygon symbolizer

Parameters:
stroke - - the stroke to use to outline the polygon
fill - - the fill to use to color the polygon
geometryPropertyName - - the name of the geometry to be drawn
min - min scale denominator
max - max scale denominator
Returns:
the new polygon symbolizer

createPointSymbolizer

public static PointSymbolizer createPointSymbolizer()
create a default point symbolizer

Returns:
the new point symbolizer

createPointSymbolizer

public static PointSymbolizer createPointSymbolizer(Graphic graphic)
create a point symbolizer

Parameters:
graphic - - the graphic object to draw at the point
Returns:
the new point symbolizer

createPointSymbolizer

public static PointSymbolizer createPointSymbolizer(Graphic graphic,
                                                    PropertyPath geometryPropertyName)
create a point symbolizer

Parameters:
graphic - - the graphic object to draw at the point
geometryPropertyName - - the name of the geometry to be drawn
Returns:
the new point symbolizer

createPointSymbolizer

public static PointSymbolizer createPointSymbolizer(Graphic graphic,
                                                    PropertyPath geometryPropertyName,
                                                    double min,
                                                    double max)
create a point symbolizer

Parameters:
graphic - - the graphic object to draw at the point
geometryPropertyName - - the name of the geometry to be drawn
min - min scale denominator
max - max scale denominator
Returns:
the new point symbolizer

createTextSymbolizer

public static TextSymbolizer createTextSymbolizer(Color color,
                                                  Font font,
                                                  String attributeName,
                                                  LabelPlacement labelPlacement)
create a textsymbolizer

Parameters:
color - the color of the text
font - the font to use
attributeName - the attribute to use for the label
labelPlacement -
Returns:
the new textsymbolizer

createTextSymbolizer

public static TextSymbolizer createTextSymbolizer(PropertyPath geometryPropertyName,
                                                  String attribute,
                                                  LabelPlacement labelPlacement)
create a textsymbolizer

Parameters:
geometryPropertyName - geometry assigned to the TextSymbolizer
attribute - attribute to draw/print
labelPlacement - defines the placement of the text
Returns:
the new textsymbolizer

createTextSymbolizer

public static TextSymbolizer createTextSymbolizer(PropertyPath geometryPropertyName,
                                                  String attribute,
                                                  Font font,
                                                  LabelPlacement labelPlacement,
                                                  Halo halo,
                                                  Fill fill,
                                                  double min,
                                                  double max)
create a textsymbolizer

Parameters:
geometryPropertyName - geometry assigned to the TextSymbolizer
attribute - attribute to draw/print
font - font to use for the text
labelPlacement - defines the placement of the text
halo - halo/backgroud of the text
fill - color, opacity of the text
min - min scale denominator
max - max scale denominator
Returns:
the new textsymbolizer

createTextSymbolizer

public static TextSymbolizer createTextSymbolizer(Geometry geometry,
                                                  ParameterValueType label,
                                                  Font font,
                                                  LabelPlacement labelPlacement,
                                                  Halo halo,
                                                  Fill fill,
                                                  double min,
                                                  double max)
create a textsymbolizer

Parameters:
geometry - geometry assigned to the TextSymbolizer
label - attribute to draw/print
font - font to use for the text
labelPlacement - defines the placement of the text
halo - halo/backgroud of the text
fill - color, opacity of the text
min - min scale denominator
max - max scale denominator
Returns:
the new textsymbolizer

createStaticTextSymbolizer

public static TextSymbolizer createStaticTextSymbolizer(Color color,
                                                        Font font,
                                                        String label)
Throws an UnsupportedOperationException, but should create a textsymbolizer which doesn't change

Parameters:
color - the color of the text
font - the font to use
label - the label to use
Returns:
the new textsymbolizer

createStaticTextSymbolizer

public static TextSymbolizer createStaticTextSymbolizer(Color color,
                                                        Font[] fonts,
                                                        String label)
Throws an UnsupportedOperationException, but should create a textsymbolizer which doesn't change

Parameters:
color - the color of the text
fonts - an array of fonts to use from the first to last
label - the label to use
Returns:
the new textsymbolizer

createRule

public static Rule createRule(Symbolizer symbolizer)
create a simple styling rule

Parameters:
symbolizer - - the symbolizer to use
Returns:
the new rule

createRule

public static Rule createRule(Symbolizer[] symbolizers)
reate a simple styling rule

Parameters:
symbolizers - - an array of symbolizers to use
Returns:
the new rule

createRule

public static Rule createRule(Symbolizer symbolizer,
                              double minScaleDenominator,
                              double maxScaleDenominator)
create a simple styling rule, see the SLD Spec for more details of scaleDenominators

Parameters:
symbolizer - - the symbolizer to use
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new rule

createRule

public static Rule createRule(Symbolizer[] symbolizers,
                              double minScaleDenominator,
                              double maxScaleDenominator)
create a simple styling rule, see the SLD Spec for more details of scaleDenominators

Parameters:
symbolizers - - an array of symbolizers to use
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new rule

createRule

public static Rule createRule(Symbolizer[] symbolizers,
                              String name,
                              String title,
                              String abstract_,
                              double minScaleDenominator,
                              double maxScaleDenominator)
create a simple styling rule, see the SLD Spec for more details of scaleDenominators

Parameters:
symbolizers - - an array of symbolizers to use
name - - name of the rule
title - - title of the rule
abstract_ - - text describing throws rule
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new rule

createRule

public static Rule createRule(Symbolizer[] symbolizers,
                              String name,
                              String title,
                              String abstract_,
                              LegendGraphic legendGraphic,
                              Filter filter,
                              boolean elseFilter,
                              double minScaleDenominator,
                              double maxScaleDenominator)
create a complex styling rule, see the SLD Spec for more details of scaleDenominators

Parameters:
symbolizers - - an array of symbolizers to use
name - - name of the rule
title - - title of the rule
abstract_ - - text describing throws rule
legendGraphic -
filter - - filter to use with the rule
elseFilter - - true if the passed is an ElseFilter (see SLD spec)
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new rule

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(Symbolizer symbolizer)
create a Feature type styler

Parameters:
symbolizer - - the symbolizer to use
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(Symbolizer symbolizer,
                                                      double minScaleDenominator,
                                                      double maxScaleDenominator)
create a Feature type styler see the SLD Spec for more details of scaleDenominators

Parameters:
symbolizer - - the symbolizer to use
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(Symbolizer[] symbolizers,
                                                      double minScaleDenominator,
                                                      double maxScaleDenominator)
create a Feature type styler see the SLD Spec for more details of scaleDenominators

Parameters:
symbolizers - - an array of symbolizers to use
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName,
                                                      Symbolizer symbolizer)
create a Feature type styler

Parameters:
featureTypeStyleName - - name for the feature type styler
symbolizer - - the symbolizer to use
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName,
                                                      Symbolizer[] symbolizers)
create a Feature type styler

Parameters:
featureTypeStyleName - - name for the feature type styler
symbolizers - - an array of symbolizers to use
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName,
                                                      Symbolizer symbolizer,
                                                      double minScaleDenominator,
                                                      double maxScaleDenominator)
create a Feature type styler see the SLD Spec for more details of scaleDenominators

Parameters:
featureTypeStyleName - - name for the feature type styler
symbolizer - - the symbolizer to use
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName,
                                                      Symbolizer[] symbolizers,
                                                      double minScaleDenominator,
                                                      double maxScaleDenominator)
create a Feature type styler see the SLD Spec for more details of scaleDenominators

Parameters:
featureTypeStyleName - - name for the feature type styler
symbolizers - - an array of symbolizers to use
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(Rule rule)
create a Feature type styler

Parameters:
rule - - rule contained in the featureTypeStyle
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(Rule[] rules)
create a Feature type styler

Parameters:
rules - - rules contained in the featureTypeStyle
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName,
                                                      Rule rule)
create a Feature type styler

Parameters:
featureTypeStyleName - - name for the feature type styler
rule - - rule contained in the featureTypeStyle
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName,
                                                      Rule[] rules)
create a Feature type styler

Parameters:
featureTypeStyleName - - name for the feature type styler
rules - - rules contained in the featureTypeStyle
Returns:
the new feature type styler

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(String featureTypeStyleName,
                                                      String title,
                                                      String abstract_,
                                                      String featureTypeName,
                                                      Rule[] rules)
create a Feature type styler

Parameters:
featureTypeStyleName - - name for the feature type styler
featureTypeName - - name of the feature type the Feature type style shall be assigned to
title - - title of the FeatureTypeStyle
abstract_ - - text describing the FeatureTypeStyle
rules - - rules contained in the featureTypeStyle
Returns:
the new feature type styler

createStyle

public static AbstractStyle createStyle(Symbolizer symbolizer)
create a new style

Parameters:
symbolizer - - the symbolizer to use
Returns:
the new style

createStyle

public static AbstractStyle createStyle(Symbolizer symbolizer,
                                        double minScaleDenominator,
                                        double maxScaleDenominator)
create a new style with name 'default'

Parameters:
symbolizer - - the symbolizer to use
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new style

createStyle

public static AbstractStyle createStyle(String name,
                                        Symbolizer symbolizer)
create a new style

Parameters:
name - - the name of the style
symbolizer - - the symbolizer to use
Returns:
the new style

createStyle

public static AbstractStyle createStyle(String name,
                                        Symbolizer symbolizer,
                                        double minScaleDenominator,
                                        double maxScaleDenominator)
create a new style

Parameters:
name - - the name of the style
symbolizer - - the symbolizer to use
minScaleDenominator - - the minimim scale to draw the feature at
maxScaleDenominator - - the maximum scale to draw the feature at
Returns:
the new style

createStyle

public static AbstractStyle createStyle(String name,
                                        String title,
                                        String abstract_,
                                        String featureTypeName,
                                        Rule[] rules)
create a style

Parameters:
name - - the name of the style
featureTypeName - - name of the feature type the Feature type style shall be assigned to
title - - title of the FeatureTypeStyle
abstract_ - - text describing the FeatureTypeStyle
rules - - rules contained in the featureTypeStyle
Returns:
the new style

createStyle

public static AbstractStyle createStyle(String name,
                                        String title,
                                        String abstract_,
                                        FeatureTypeStyle featureTypeStyle)
create a new style

Parameters:
name - - the name of the style
title - - title of the style
abstract_ - - text describing the style
featureTypeStyle - - featureTypeStyle
Returns:
the new style

createStyle

public static AbstractStyle createStyle(String name,
                                        String title,
                                        String abstract_,
                                        FeatureTypeStyle[] featureTypeStyles)
create a new style

Parameters:
name - - the name of the style
title - - title of the style
abstract_ - - text describing the style
featureTypeStyles - - featureTypeStyle
Returns:
the new style

createPointStyle

public static AbstractStyle createPointStyle(String wellKnownName,
                                             Color fillColor,
                                             Color borderColor,
                                             double borderWidth,
                                             double opacity,
                                             double size,
                                             double rotation,
                                             double min,
                                             double max)
creates a style with name 'defaultPoint' for rendering point geometries

Parameters:
wellKnownName - the well known name of the mark
fillColor - the color of the mark
borderColor - the outline color of the mark
borderWidth - the width of the outline
opacity - - the opacity of the graphic
size - - the size of the graphic
rotation - - the rotation from the top of the page of the graphic
min - - the minimim scale to draw the feature at
max - - the maximum scale to draw the feature at
Returns:
the style created

createLineStyle

public static AbstractStyle createLineStyle(Color color,
                                            double width,
                                            double opacity,
                                            double min,
                                            double max)
creates a style with name 'defaultLine' for rendering line geometries

Parameters:
color - the line color
width - the width of the line
opacity - - the opacity of the line
min - - the minimim scale to draw the feature at
max - - the maximum scale to draw the feature at
Returns:
the style created

createPolygonStyle

public static AbstractStyle createPolygonStyle(Color fillColor,
                                               double fillOpacity,
                                               Color strokeColor,
                                               double strokeWidth,
                                               double strokeOpacity,
                                               double min,
                                               double max)
creates a style with name 'defaultPolygon' for rendering polygon geometries

Parameters:
fillColor - - the fill color of the polygon
fillOpacity - - the fill opacity of the polygon
strokeColor - - the line color
strokeWidth - - the width of the line
strokeOpacity - - the opacity of the line
min - - the minimim scale to draw the feature at
max - - the maximum scale to draw the feature at
Returns:
the style created

createPointStyle

public static AbstractStyle createPointStyle(String[] wellKnownNames,
                                             Color startFillColor,
                                             Color endFillColor,
                                             Color startBorderColor,
                                             Color endBorderColor,
                                             double startBorderWidth,
                                             double endBorderWidth,
                                             double opacity,
                                             double startSize,
                                             double endSize,
                                             double rotation,
                                             double min,
                                             double max,
                                             String featurePropertyName,
                                             int numberOfSteps)
Throws an UnsupportedOperationException, but should create a style with name 'defaultPoint' for rendering point geometries. The style contains 1..n rules depending on the value range and the number of steps within it. So it is possible to create a style that creates different rendering depending on the value of one feature attribute.

there will be a linear interpolation between colors, size and width of the first and the last rule considering the number of passed steps (rules)

Parameters:
wellKnownNames - - list of well known names of the mark. the first field will be assigned to the starting rule the last to the ending rule.
startFillColor - - the color of the mark of the first rule
endFillColor - - the color of the mark of the last rule
startBorderColor - - the outline color of the mark of the first rule
endBorderColor - - the outline color of the mark of the last rule
startBorderWidth - - the width of the outline of the first rule
endBorderWidth - - the width of the outline of the last rule
opacity - - the opacity of the graphic
startSize - - the size of the graphic of the first rule
endSize - - the size of the graphic of the last rule
rotation - - the rotation from the top of the page of the graphic
min - - the minimim scale to draw the feature at
max - - the maximum scale to draw the feature at
featurePropertyName - - name of the feature property that determines the selection of the rule for drawing
numberOfSteps - - number of steps used for the interpolation between first and last value. It is identical with the number of rules that will be created.
Returns:
the style created

createLineStyle

public static AbstractStyle createLineStyle(Color startColor,
                                            Color endColor,
                                            double startWidth,
                                            double endWidth,
                                            double opacity,
                                            double min,
                                            double max,
                                            String featurePropertyName,
                                            int numberOfSteps)
Throws an UnsupportedOperationException, but should create a style with name 'defaultLine' for rendering line geometries. The style contains 1..n rules depending on the value range and the number of steps within it. So it is possible to create a style that creates different rendering depending on the value of one feature attribute.

there will be a linear interpolation between colors, size and width of the first and the last rule considering the number of passed steps (rules)

Parameters:
startColor - - the color of the first rule
endColor - - the color of the last rule
startWidth - - the width of the line of the first rule
endWidth - - the width of the line of the last rule
opacity - - the opacity of the graphic
min - - the minimim scale to draw the feature at
max - - the maximum scale to draw the feature at
featurePropertyName - - name of the feature property that determines the selection of the rule for drawing
numberOfSteps - - number of steps used for the interpolation between first and last value. It is identical with the number of rules that will be created.
Returns:
the style created

createPolygonStyle

public static AbstractStyle createPolygonStyle(Color startFillColor,
                                               Color endFillColor,
                                               double fillOpacity,
                                               Color startStrokeColor,
                                               Color endStrokeColor,
                                               double startStrokeWidth,
                                               double endStrokeWidth,
                                               double strokeOpacity,
                                               double min,
                                               double max,
                                               String featurePropertyName,
                                               int numberOfSteps)
Throws an UnsupportedOperationException, but should create a style with name 'defaultPoint' for rendering point geometries. The style contains 1..n rules depending on the value range and the number of steps within it. So it is possible to create a style that creates different rendering depending on the value of one feature attribute.

there will be a linear interpolation between colors, size and width of the first and the last rule considering the number of passed steps (rules)

Parameters:
startFillColor - - the fill color of the first rule
endFillColor - - the fill color of the last rule
fillOpacity - - the opacity of the fill
startStrokeColor - - the line color of the first rule
endStrokeColor - - the line color of the last rule
startStrokeWidth - - the width of the outline of the first rule
endStrokeWidth - - the width of the outline of the last rule
strokeOpacity - - the opacity of the outline
min - - the minimim scale to draw the feature at
max - - the maximum scale to draw the feature at
featurePropertyName - - name of the feature property that determines the selection of the rule for drawing
numberOfSteps - - number of steps used for the interpolation between first and last value. It is identical with the number of rules that will be created.
Returns:
the style created

createStyle

public static AbstractStyle createStyle()
create a new default style

Returns:
the new style

deegree 2.3 (2010/04/09 10:10 build-4-official)

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