org.geotools.styling
Class SLD

java.lang.Object
  extended byorg.geotools.styling.SLD

public class SLD
extends java.lang.Object

Utility class for working with Geotools SLD objects.

This class assumes a subset of the SLD specification:

When you start to branch out to SLD information that contains multiple rules you will need to modify this class.

Since:
0.7.0

Field Summary
static StyleBuilder builder
           
static int NOTFOUND
          NOTFOUND indicates int value was unavailable
 
Constructor Summary
SLD()
           
 
Method Summary
static java.awt.Color color(Expression expr)
          Navigate through the expression finding the first mentioned Color.
static java.awt.Color color(Fill fill)
           
static java.awt.Color color(LineSymbolizer symbolizer)
          Retrieve color from linesymbolizer if available.
static java.awt.Color color(PointSymbolizer symbolizer)
          Grabs the color from the first Mark.
static java.lang.String[] colors(Rule rule)
           
static java.lang.String[] colors(Style style)
           
static java.lang.String colorToHex(java.awt.Color c)
           
static Style defaultStyle(StyledLayerDescriptor sld)
           
static double doubleValue(Expression expr)
          Deprecated.  
static FeatureTypeStyle featureTypeStyle(StyledLayerDescriptor sld, FeatureType type)
           
static FeatureTypeStyle featureTypeStyle(Style style, FeatureType type)
          Returns the feature type style in the style which matched a particular name.
static FeatureTypeStyle[] featureTypeStyles(StyledLayerDescriptor sld)
           
static Fill fill(PointSymbolizer sym)
           
static Fill fill(PolygonSymbolizer sym)
           
static Filter[] filters(Rule[] rule)
           
static Filter[] filters(Style style)
           
static Font font(TextSymbolizer symbolizer)
           
static Graphic graphic(PointSymbolizer sym)
           
static int intValue(Expression expr)
          Deprecated.  
static java.awt.Color lineColor(LineSymbolizer symbolizer)
          Retrieve linestring color from linesymbolizer if available.
static float[] lineDash(LineSymbolizer symbolizer)
          Grabs the dashes array from the first LineSymbolizer.
static java.lang.String lineLinecap(LineSymbolizer symbolizer)
          Grabs the linecap from the first LineSymbolizer.
static java.lang.String lineLinejoin(LineSymbolizer symbolizer)
          Grabs the linejoin from the first LineSymbolizer.
static double lineOpacity(LineSymbolizer symbolizer)
          Grabs the opacity from the first LineSymbolizer.
static LineSymbolizer lineSymbolizer(FeatureTypeStyle fts)
          Retrieve the first LineSymbolizer from the provided Style.
static LineSymbolizer lineSymbolizer(Style style)
          Retrieve the first LineSymbolizer from the provided Style.
static int lineWidth(LineSymbolizer symbolizer)
          Retrieve linestring width from symbolizer if available.
static Mark mark(Graphic graphic)
           
static Mark mark(PointSymbolizer sym)
           
static Style matchingStyle(Style[] styles, FeatureType schema)
          Returns the first style object which matches a given schema.
static java.lang.Number number(Expression expr)
          Deprecated.  
static double opacity(Fill fill)
           
static double opacity(Stroke stroke)
           
static double pointBorderOpacity(PointSymbolizer symbolizer)
          Grabs the point border opacity from the first PointSymbolizer.
static java.awt.Color pointColor(PointSymbolizer symbolizer)
          Grabs the color from the first Mark.
static java.awt.Color pointFill(PointSymbolizer symbolizer)
          Grabs the fill from the first Mark.
static java.net.URL pointGraphic(Style style)
          Grabs the location of the first external graphic.
static Mark pointMark(Style style)
           
static double pointOpacity(PointSymbolizer symbolizer)
          Grabs the point opacity from the first PointSymbolizer.
static int pointSize(PointSymbolizer symbolizer)
          Grabs the size of the points graphic, if found.
static PointSymbolizer pointSymbolizer(FeatureTypeStyle fts)
          Retrieve the first PointSymbolizer from the provided FeatureTypeStyle.
static PointSymbolizer pointSymbolizer(Style style)
          Retrieve the first PointSymbolizer from the provided Style.
static java.lang.String pointWellKnownName(PointSymbolizer symbolizer)
          Grabs the well known name of the first Mark that has one.
static int pointWidth(PointSymbolizer symbolizer)
          Grabs the width of the first Mark with a Stroke that has a non-null width.
static double polyBorderOpacity(PolygonSymbolizer symbolizer)
          Grabs the border opacity from the first PolygonSymbolizer.
static java.awt.Color polyColor(PolygonSymbolizer symbolizer)
          Grabs the color from the first PolygonSymbolizer.
static java.awt.Color polyFill(PolygonSymbolizer symbolizer)
          Grabs the fill from the first PolygonSymbolizer.
static double polyFillOpacity(PolygonSymbolizer symbolizer)
          Grabs the fill opacity from the first PolygonSymbolizer.
static PolygonSymbolizer polySymbolizer(FeatureTypeStyle fts)
          Retrieve the first PolygonSymbolizer from the provided Style.
static PolygonSymbolizer polySymbolizer(Style style)
          Retrieve the first PolygonSymbolizer from the provided Style.
static int polyWidth(PolygonSymbolizer symbolizer)
          Grabs the color from the first PolygonSymbolizer.
static double rasterOpacity(RasterSymbolizer symbolizer)
          Grabs the opacity from the first RasterSymbolizer.
static double rasterOpacity(Style style)
           
static RasterSymbolizer rasterSymbolizer(FeatureTypeStyle fts)
          Retrieve the first RasterSymbolizer from the provided Style.
static RasterSymbolizer rasterSymbolizer(Style style)
          Retrieve the first RasterSymbolizer from the provided Style.
static Rule[] rules(Style style)
           
static void setLineColour(LineSymbolizer symbolizer, java.awt.Color colour)
          Sets the Colour for the given Line symbolizer
static void setLineColour(Style style, java.awt.Color colour)
          Sets the colour for a line symbolizer
static void setPointColour(PointSymbolizer symbolizer, java.awt.Color colour)
          Sets the Colour for the given point symbolizer
static void setPointColour(Style style, java.awt.Color colour)
          Sets the Colour for the point symbolizer
static void setPolyColour(PolygonSymbolizer symbolizer, java.awt.Color colour)
          Sets the Colour for the given polygon symbolizer
static void setPolyColour(Style style, java.awt.Color colour)
          Sets the colour for a polygon symbolizer
static int size(Mark mark)
           
static java.lang.String stringValue(Expression expr)
          Deprecated.  
static Stroke stroke(LineSymbolizer sym)
           
static Stroke stroke(PointSymbolizer sym)
           
static Stroke stroke(PolygonSymbolizer sym)
           
static java.awt.Color strokeColor(Stroke stroke)
           
static StyledLayerDescriptor styledLayerDescriptor(java.lang.Object gtComponent)
          Climbs the style hierarchy until null or an SLD is found.
static Style[] styles(StyledLayerDescriptor sld)
           
protected static Symbolizer symbolizer(FeatureTypeStyle fts, java.lang.Class SYMBOLIZER)
          Retrieve the first SYMBOLIZER from the provided FeatureTypeStyle.
protected static Symbolizer symbolizer(Style style, java.lang.Class SYMBOLIZER)
          Retrieve the first SYMBOLIZER from the provided Style.
static java.awt.Color textFontFill(TextSymbolizer symbolizer)
          Grabs the fontFill from the first TextSymbolizer.
static java.awt.Color textHaloFill(TextSymbolizer symbolizer)
          Grabs the haloFill from the first TextSymbolizer.
static double textHaloOpacity(TextSymbolizer symbolizer)
          Grabs the halo opacity from the first TextSymbolizer.
static int textHaloWidth(TextSymbolizer symbolizer)
          Grabs the halo width from the first TextSymbolizer.
static Expression textLabel(TextSymbolizer symbolizer)
          Grabs the label from the first TextSymbolizer.
static java.lang.String textLabelString(TextSymbolizer sym)
           
static TextSymbolizer textSymbolizer(FeatureTypeStyle fts)
          Retrieve the first TextSymbolizer from the provided Style.
static TextSymbolizer textSymbolizer(Style style)
          Retrieve the first TextSymbolizer from the provided Style.
static java.awt.Color toColor(java.lang.String htmlColor)
           
static java.lang.String toHTMLColor(java.awt.Color color)
          Converts a java.awt.Color into an HTML Colour
static java.lang.Object value(Expression expr, java.lang.Class TYPE)
          Deprecated.  
static java.lang.String wellKnownName(Mark mark)
           
static int width(LineSymbolizer symbolizer)
          Retrieve linestring width from symbolizer if available.
static int width(Stroke stroke)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTFOUND

public static final int NOTFOUND
NOTFOUND indicates int value was unavailable

See Also:
Constant Field Values

builder

public static final StyleBuilder builder
Constructor Detail

SLD

public SLD()
Method Detail

lineColor

public static java.awt.Color lineColor(LineSymbolizer symbolizer)
Retrieve linestring color from linesymbolizer if available.

Parameters:
symbolizer - Line symbolizer information.
Returns:
Color of linestring, or null if unavailable.

strokeColor

public static java.awt.Color strokeColor(Stroke stroke)

color

public static java.awt.Color color(Fill fill)

setLineColour

public static void setLineColour(Style style,
                                 java.awt.Color colour)
Sets the colour for a line symbolizer

Parameters:
style -
colour -

setLineColour

public static void setLineColour(LineSymbolizer symbolizer,
                                 java.awt.Color colour)
Sets the Colour for the given Line symbolizer

Parameters:
symbolizer -
colour -

color

public static java.awt.Color color(LineSymbolizer symbolizer)
Retrieve color from linesymbolizer if available.

Parameters:
symbolizer - Line symbolizer information.
Returns:
Color of linestring, or null if unavailable.

lineWidth

public static int lineWidth(LineSymbolizer symbolizer)
Retrieve linestring width from symbolizer if available.

Parameters:
symbolizer - Line symbolizer information.
Returns:
width of linestring, or NOTFOUND

width

public static int width(Stroke stroke)

size

public static int size(Mark mark)

width

public static int width(LineSymbolizer symbolizer)
Retrieve linestring width from symbolizer if available.

Parameters:
symbolizer - Line symbolizer information.
Returns:
width of linestring, or NOTFOUND

lineOpacity

public static double lineOpacity(LineSymbolizer symbolizer)
Grabs the opacity from the first LineSymbolizer.

Parameters:
symbolizer - Line symbolizer information.
Returns:
double of the line stroke's opacity, or NaN if unavailable.

opacity

public static double opacity(Stroke stroke)

lineLinejoin

public static java.lang.String lineLinejoin(LineSymbolizer symbolizer)
Grabs the linejoin from the first LineSymbolizer.

Parameters:
symbolizer - Line symbolizer information.
Returns:
String of the line stroke's linejoin, or null if unavailable.

lineLinecap

public static java.lang.String lineLinecap(LineSymbolizer symbolizer)
Grabs the linecap from the first LineSymbolizer.

Parameters:
symbolizer - Line symbolizer information.
Returns:
String of the line stroke's linecap, or null if unavailable.

lineDash

public static float[] lineDash(LineSymbolizer symbolizer)
Grabs the dashes array from the first LineSymbolizer.

Parameters:
symbolizer - Line symbolizer information.
Returns:
float[] of the line dashes array, or null if unavailable.

pointGraphic

public static java.net.URL pointGraphic(Style style)
Grabs the location of the first external graphic.

Parameters:
style - SLD style information.
Returns:
Location of the first external graphic, or null

pointMark

public static Mark pointMark(Style style)

mark

public static Mark mark(PointSymbolizer sym)

mark

public static Mark mark(Graphic graphic)

graphic

public static Graphic graphic(PointSymbolizer sym)

pointSize

public static int pointSize(PointSymbolizer symbolizer)
Grabs the size of the points graphic, if found.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Point symbolizer information.
Returns:
size of the graphic

pointWellKnownName

public static java.lang.String pointWellKnownName(PointSymbolizer symbolizer)
Grabs the well known name of the first Mark that has one.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Point symbolizer information.
Returns:
well known name of the first Mark

wellKnownName

public static java.lang.String wellKnownName(Mark mark)

pointColor

public static java.awt.Color pointColor(PointSymbolizer symbolizer)
Grabs the color from the first Mark.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Point symbolizer information.
Returns:
Color of the point's mark, or null if unavailable.

setPointColour

public static void setPointColour(Style style,
                                  java.awt.Color colour)
Sets the Colour for the point symbolizer

Parameters:
style -
colour -

setPointColour

public static void setPointColour(PointSymbolizer symbolizer,
                                  java.awt.Color colour)
Sets the Colour for the given point symbolizer

Parameters:
symbolizer -
colour -

color

public static java.awt.Color color(PointSymbolizer symbolizer)
Grabs the color from the first Mark.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Point symbolizer information.
Returns:
Color of the point's mark, or null if unavailable.

pointWidth

public static int pointWidth(PointSymbolizer symbolizer)
Grabs the width of the first Mark with a Stroke that has a non-null width.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Point symbolizer information.
Returns:
width of the points border

pointBorderOpacity

public static double pointBorderOpacity(PointSymbolizer symbolizer)
Grabs the point border opacity from the first PointSymbolizer.

If you are using something fun like rules you will need to do your own thing.

Parameters:
symbolizer - Point symbolizer information.
Returns:
double of the point's border opacity, or NaN if unavailable.

pointOpacity

public static double pointOpacity(PointSymbolizer symbolizer)
Grabs the point opacity from the first PointSymbolizer.

If you are using something fun like rules you will need to do your own thing.

Parameters:
symbolizer - Point symbolizer information.
Returns:
double of the point's opacity, or NaN if unavailable.

pointFill

public static java.awt.Color pointFill(PointSymbolizer symbolizer)
Grabs the fill from the first Mark.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Point symbolizer information.
Returns:
Color of the point's fill, or null if unavailable.

polyWidth

public static int polyWidth(PolygonSymbolizer symbolizer)
Grabs the color from the first PolygonSymbolizer.

If you are using something fun like rules you will need to do your own thing.

Parameters:
symbolizer - Polygon symbolizer information.
Returns:
Color of the polygon's stroke, or null if unavailable.

polyColor

public static java.awt.Color polyColor(PolygonSymbolizer symbolizer)
Grabs the color from the first PolygonSymbolizer.

If you are using something fun like rules you will need to do your own thing.

Parameters:
symbolizer - Polygon symbolizer information.
Returns:
Color of the polygon's stroke, or null if unavailable.

setPolyColour

public static void setPolyColour(Style style,
                                 java.awt.Color colour)
Sets the colour for a polygon symbolizer

Parameters:
style -
colour -

setPolyColour

public static void setPolyColour(PolygonSymbolizer symbolizer,
                                 java.awt.Color colour)
Sets the Colour for the given polygon symbolizer

Parameters:
symbolizer -
colour -

polyFill

public static java.awt.Color polyFill(PolygonSymbolizer symbolizer)
Grabs the fill from the first PolygonSymbolizer.

If you are using something fun like rules you will need to do your own thing.

Parameters:
symbolizer - Polygon symbolizer information.
Returns:
Color of the polygon's fill, or null if unavailable.

polyBorderOpacity

public static double polyBorderOpacity(PolygonSymbolizer symbolizer)
Grabs the border opacity from the first PolygonSymbolizer.

If you are using something fun like rules you will need to do your own thing.

Parameters:
symbolizer - Polygon symbolizer information.
Returns:
double of the polygon's border opacity, or NaN if unavailable.

polyFillOpacity

public static double polyFillOpacity(PolygonSymbolizer symbolizer)
Grabs the fill opacity from the first PolygonSymbolizer.

If you are using something fun like rules you will need to do your own thing.

Parameters:
symbolizer - Polygon symbolizer information.
Returns:
double of the polygon's fill opacity, or NaN if unavailable.

opacity

public static double opacity(Fill fill)

rasterOpacity

public static double rasterOpacity(RasterSymbolizer symbolizer)
Grabs the opacity from the first RasterSymbolizer.

If you are using something fun like rules you will need to do your own thing.

Parameters:
symbolizer - Raster symbolizer information.
Returns:
opacity of the first RasterSymbolizer

rasterOpacity

public static double rasterOpacity(Style style)

textSymbolizer

public static TextSymbolizer textSymbolizer(FeatureTypeStyle fts)
Retrieve the first TextSymbolizer from the provided Style.

Parameters:
fts - SLD featureTypeStyle information.
Returns:
TextSymbolizer, or null if not found.

textSymbolizer

public static TextSymbolizer textSymbolizer(Style style)
Retrieve the first TextSymbolizer from the provided Style.

Parameters:
style - SLD style information.
Returns:
TextSymbolizer, or null if not found.

textLabel

public static Expression textLabel(TextSymbolizer symbolizer)
Grabs the label from the first TextSymbolizer.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Text symbolizer information.
Returns:
Expression of the label's text, or null if unavailable.

textLabelString

public static java.lang.String textLabelString(TextSymbolizer sym)

textFontFill

public static java.awt.Color textFontFill(TextSymbolizer symbolizer)
Grabs the fontFill from the first TextSymbolizer.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Text symbolizer information.
Returns:
Color of the font's fill, or null if unavailable.

font

public static Font font(TextSymbolizer symbolizer)

textHaloFill

public static java.awt.Color textHaloFill(TextSymbolizer symbolizer)
Grabs the haloFill from the first TextSymbolizer.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Text symbolizer information.
Returns:
Color of the halo's fill, or null if unavailable.

textHaloWidth

public static int textHaloWidth(TextSymbolizer symbolizer)
Grabs the halo width from the first TextSymbolizer.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Text symbolizer information.
Returns:
float of the halo's width, or null if unavailable.

textHaloOpacity

public static double textHaloOpacity(TextSymbolizer symbolizer)
Grabs the halo opacity from the first TextSymbolizer.

If you are using something fun like symbols you will need to do your own thing.

Parameters:
symbolizer - Text symbolizer information.
Returns:
double of the halo's opacity, or NaN if unavailable.

value

public static java.lang.Object value(Expression expr,
                                     java.lang.Class TYPE)
Deprecated.  

This method is here for backwards compatability.

Parameters:
expr - DOCUMENT ME!
TYPE - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
org.geotools.filter.Filters#value(Expression, Class)

color

public static java.awt.Color color(Expression expr)
Navigate through the expression finding the first mentioned Color.

If you have a specific Feature in mind please use:


 Object value = expr.getValue( feature );
 return value instanceof Color ? (Color) value : null;
 

Parameters:
expr -
Returns:
First available color, or null.

intValue

public static int intValue(Expression expr)
Deprecated.  

This method is here for backward compatability.

Parameters:
expr - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
Filters#intValue(Expression)

stringValue

public static java.lang.String stringValue(Expression expr)
Deprecated.  

This method is here for backward compatability.

Parameters:
expr - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
Filters#stringValue(Expression)

doubleValue

public static double doubleValue(Expression expr)
Deprecated.  

This method is here for backward compatability.

Parameters:
expr - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
Filters#doubleValue(Expression)

number

public static java.lang.Number number(Expression expr)
Deprecated.  

This method is here for backward compatability.

Parameters:
expr - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
Filters#number(Expression)

rasterSymbolizer

public static RasterSymbolizer rasterSymbolizer(FeatureTypeStyle fts)
Retrieve the first RasterSymbolizer from the provided Style.

Parameters:
fts - SLD featureTypeStyle information.
Returns:
RasterSymbolizer, or null if not found.

rasterSymbolizer

public static RasterSymbolizer rasterSymbolizer(Style style)
Retrieve the first RasterSymbolizer from the provided Style.

Parameters:
style - SLD style information.
Returns:
RasterSymbolizer, or null if not found.

lineSymbolizer

public static LineSymbolizer lineSymbolizer(FeatureTypeStyle fts)
Retrieve the first LineSymbolizer from the provided Style.

Parameters:
fts - SLD featureTypeStyle information.
Returns:
LineSymbolizer, or null if not found.

lineSymbolizer

public static LineSymbolizer lineSymbolizer(Style style)
Retrieve the first LineSymbolizer from the provided Style.

Parameters:
style - SLD style information.
Returns:
LineSymbolizer, or null if not found.

stroke

public static Stroke stroke(LineSymbolizer sym)

stroke

public static Stroke stroke(PolygonSymbolizer sym)

stroke

public static Stroke stroke(PointSymbolizer sym)

fill

public static Fill fill(PolygonSymbolizer sym)

fill

public static Fill fill(PointSymbolizer sym)

pointSymbolizer

public static PointSymbolizer pointSymbolizer(FeatureTypeStyle fts)
Retrieve the first PointSymbolizer from the provided FeatureTypeStyle.

Parameters:
fts - SLD featureTypeStyle information.
Returns:
PointSymbolizer, or null if not found.

pointSymbolizer

public static PointSymbolizer pointSymbolizer(Style style)
Retrieve the first PointSymbolizer from the provided Style.

Parameters:
style - SLD style information.
Returns:
PointSymbolizer, or null if not found.

polySymbolizer

public static PolygonSymbolizer polySymbolizer(FeatureTypeStyle fts)
Retrieve the first PolygonSymbolizer from the provided Style.

Parameters:
fts - SLD featureTypeStyle information.
Returns:
PolygonSymbolizer, or null if not found.

polySymbolizer

public static PolygonSymbolizer polySymbolizer(Style style)
Retrieve the first PolygonSymbolizer from the provided Style.

Parameters:
style - SLD style information.
Returns:
PolygonSymbolizer, or null if not found.

featureTypeStyle

public static FeatureTypeStyle featureTypeStyle(Style style,
                                                FeatureType type)
Returns the feature type style in the style which matched a particular name.

Parameters:
style - The style in question.
type - The feature type must be non-null.
Returns:
Teh FeatureTypeStyle object if it exists, otherwise false.

matchingStyle

public static Style matchingStyle(Style[] styles,
                                  FeatureType schema)
Returns the first style object which matches a given schema.

Parameters:
styles - Array of style objects.
schema - Feature schema.
Returns:
The first object to match the feature type, otherwise null if no match.

symbolizer

protected static Symbolizer symbolizer(Style style,
                                       java.lang.Class SYMBOLIZER)
Retrieve the first SYMBOLIZER from the provided Style.

Parameters:
style - SLD style information.
SYMBOLIZER - LineSymbolizer.class, PointSymbolizer.class, PolygonSymbolizer.class, RasterSymbolizer.class, or TextSymbolizer.class
Returns:
symbolizer instance from style, or null if not found.

symbolizer

protected static Symbolizer symbolizer(FeatureTypeStyle fts,
                                       java.lang.Class SYMBOLIZER)
Retrieve the first SYMBOLIZER from the provided FeatureTypeStyle.

Parameters:
SYMBOLIZER - LineSymbolizer.class, PointSymbolizer.class, PolygonSymbolizer.class, RasterSymbolizer.class, or TextSymbolizer.class
Returns:
symbolizer instance from fts, or null if not found.

colorToHex

public static java.lang.String colorToHex(java.awt.Color c)

styles

public static Style[] styles(StyledLayerDescriptor sld)

featureTypeStyles

public static FeatureTypeStyle[] featureTypeStyles(StyledLayerDescriptor sld)

featureTypeStyle

public static FeatureTypeStyle featureTypeStyle(StyledLayerDescriptor sld,
                                                FeatureType type)

defaultStyle

public static Style defaultStyle(StyledLayerDescriptor sld)

styledLayerDescriptor

public static StyledLayerDescriptor styledLayerDescriptor(java.lang.Object gtComponent)
Climbs the style hierarchy until null or an SLD is found.

Returns:
SLD

filters

public static Filter[] filters(Rule[] rule)

filters

public static Filter[] filters(Style style)

rules

public static Rule[] rules(Style style)

colors

public static java.lang.String[] colors(Style style)

colors

public static java.lang.String[] colors(Rule rule)

toHTMLColor

public static java.lang.String toHTMLColor(java.awt.Color color)
Converts a java.awt.Color into an HTML Colour

Parameters:
color -
Returns:
HTML Color (fill) in hex #RRGGBB

toColor

public static java.awt.Color toColor(java.lang.String htmlColor)


Copyright © GeoTools. All Rights Reserved.