Package org.geotools.styling
Class StyleBuilder
Object
StyleBuilder
An utility class designed to ease style building with convenience methods.
- Author:
- aaime
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
ConstructorsConstructorDescriptionuse the default StyleFactory and FilterFactoryStyleBuilder
(FilterFactory filterFactory) Use the supplied FilterFactory when building stylesStyleBuilder
(StyleFactory styleFactory) Use the supplied StyleFactory when building stylesStyleBuilder
(StyleFactory styleFactory, FilterFactory filterFactory) Use the supplied StyleFactory and FilterFactory when building styles -
Method Summary
Modifier and TypeMethodDescriptionattributeExpression
(String attributeName) create an attribute expressionbuildClassifiedStyle
(SimpleFeatureCollection fc, String name, String[] colors, SimpleFeatureType schema) given a feature collection and an array of colours build a style with the given number of classes on the named columncolorExpression
(Color color) convert an awt color in to a literal expression representing the colorcreateAnchorPoint
(double x, double y) wrapper round Stylefactory Methodwrapper round Stylefactory MethodcreateColorMap
(String[] labels, double[] quantities, Color[] colors, int type) Creates a color map based on fixed quantities and colors.createDisplacement
(double x, double y) wrapper round Stylefactory Methodwrapper round Stylefactory MethodcreateExternalGraphic
(String uri, String format) wrapper for stylefactory methodcreateExternalGraphic
(URL url, String format) wrapper for stylefactory methodcreateFeatureTypeStyle
(String typeName, Rule r) create a SimpleFeature type stylercreateFeatureTypeStyle
(String typeName, Rule... rules) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominatorscreateFeatureTypeStyle
(String featureTypeName, Symbolizer symbolizer) create a SimpleFeature type stylercreateFeatureTypeStyle
(String featureTypeName, Symbolizer... symbolizers) create a SimpleFeature type stylercreateFeatureTypeStyle
(String typeName, Symbolizer[] symbolizers, double minScaleDenominator, double maxScaleDenominator) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominatorscreateFeatureTypeStyle
(String typeName, Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominatorscreateFeatureTypeStyle
(Symbolizer symbolizer) create a SimpleFeature type stylercreateFeatureTypeStyle
(Symbolizer[] symbolizers, double minScaleDenominator, double maxScaleDenominator) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominatorscreateFeatureTypeStyle
(Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominatorscreate a default fill 50% graycreateFill
(Color fillColor) create a fill of colorcreateFill
(Color fillColor, double opacity) create a fill with the supplied color and opacitycreateFill
(Color color, Color backgroundColor, double opacity, Graphic fill) create a fill with color, background color and opacity supplied and uses the graphic supplied for the fillcreateFill
(Expression fillColor) create a fill of colorcreateFill
(Expression color, Expression opacity) create a fill with the supplied color and opacitycreateFill
(Expression color, Expression backgroundColor, Expression opacity, Graphic fill) create a fill with color, background color and opacity supplied and uses the graphic supplied for the fillcreateFont
(Font font) create a geotools font object from a java fontcreateFont
(String fontFamily, boolean italic, boolean bold, double fontSize) create font of supplied family, size and weight/stylecreateFont
(String fontFamily, double fontSize) create font of supplied family and sizecreateFont
(Expression fontFamily, Expression fontStyle, Expression fontWeight, Expression fontSize) wrapper round StyleFactory methodCreates the default graphic objectcreateGraphic
(ExternalGraphic[] externalGraphics, Mark[] marks, Symbol[] symbols, double opacity, double size, double rotation) creates a graphic objectcreateGraphic
(ExternalGraphic[] externalGraphics, Mark[] marks, Symbol[] symbols, Expression opacity, Expression size, Expression rotation) creates a graphic objectcreateGraphic
(ExternalGraphic externalGraphic, Mark mark, Symbol symbol) creates a graphic objectcreateGraphic
(ExternalGraphic externalGraphic, Mark mark, Symbol symbol, double opacity, double size, double rotation) creates a graphic objectwrapper round StyleFactory method to create default halocreateHalo
(Color color, double radius) wrapper round StyleFactory method to create halocreateHalo
(Color color, double opacity, double radius) wrapper round StyleFactory method to create halocreateHalo
(Fill fill, double radius) wrapper round StyleFactory method to create halocreateHalo
(Fill fill, Expression radius) wrapper round StyleFactory method to create halocreateLinePlacement
(double offset) wrapper round Stylefactory MethodcreateLinePlacement
(Expression offset) wrapper round Stylefactory Methodcreate a default line symbolisercreateLineSymbolizer
(double width) create a new line symbolizercreateLineSymbolizer
(Color color) create a LineSymbolizercreateLineSymbolizer
(Color color, double width) create a LineSymbolizercreateLineSymbolizer
(Color color, double width, String geometryPropertyName) create a LineSymbolizercreateLineSymbolizer
(Stroke stroke) create a LineSymbolizercreateLineSymbolizer
(Stroke stroke, String geometryPropertyName) create a LineSymbolizercreateMark
(String wellKnownName) create the named markcreateMark
(String wellKnownName, Color fillColor) create a mark of the supplied color and a default outline (black)createMark
(String wellKnownName, Color borderColor, double borderWidth) create a mark with default fill (50% gray) and the supplied outlinecreateMark
(String wellKnownName, Color fillColor, Color borderColor, double borderWidth) create the named mark with the colors etc suppliedcreateMark
(String wellKnownName, Fill fill, Stroke stroke) create a mark with the supplied fill and strokecreateMark
(Expression wellKnownName, Fill fill, Stroke stroke) create a mark with the supplied fill and strokewrapper round Stylefactory MethodcreatePointPlacement
(double anchorX, double anchorY, double rotation) wrapper round Stylefactory MethodcreatePointPlacement
(double anchorX, double anchorY, double displacementX, double displacementY, double rotation) wrapper round Stylefactory MethodcreatePointPlacement
(AnchorPoint anchorPoint, Displacement displacement, Expression rotation) wrapper round Stylefactory Methodcreate a default point symbolizercreatePointSymbolizer
(Graphic graphic) create a point symbolizercreatePointSymbolizer
(Graphic graphic, String geometryPropertyName) create a point symbolizercreate a default polygon symbolizercreatePolygonSymbolizer
(Color fillColor) create a polygon symbolizercreatePolygonSymbolizer
(Color borderColor, double borderWidth) create a polygon symbolizercreatePolygonSymbolizer
(Color fillColor, Color borderColor, double borderWidth) create a polygon symbolizercreatePolygonSymbolizer
(Stroke stroke, Fill fill) create a polygon symbolizercreatePolygonSymbolizer
(Stroke stroke, Fill fill, String geometryPropertyName) create a polygon symbolizerCreates the default raster symbolizercreateRasterSymbolizer
(ColorMap colorMap, double opacity) Creates a raster symbolizercreateRule
(Symbolizer symbolizer) create a simple styling rulecreateRule
(Symbolizer... symbolizers) reate a simple styling rulecreateRule
(Symbolizer[] symbolizers, double minScaleDenominator, double maxScaleDenominator) create a simple styling rule, see the SLD Spec for more details of scaleDenominatorscreateRule
(Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a simple styling rule, see the SLD Spec for more details of scaleDenominatorscreateStaticTextSymbolizer
(Color color, Font[] fonts, String label) create a textsymbolizer which doesn't changecreateStaticTextSymbolizer
(Color color, Font font, String label) create a textsymbolizer which doesn't changecreate a default StrokecreateStroke
(double width) create a default stroke with the supplied widthcreateStroke
(Color color) Create a default stroke with the supplied colorcreateStroke
(Color color, double width) create a stroke with the supplied width and colorcreateStroke
(Color color, double width, double opacity) create a stroke with color, width and opacity suppliedcreateStroke
(Color color, double width, float[] dashArray) create a dashed line of color and widthcreateStroke
(Color color, double width, String lineJoin, String lineCap) create a stroke with color, width, linejoin type and lineCap type.createStroke
(Expression color, Expression width) create a stroke with the color and width suppliedcreateStroke
(Expression color, Expression width, Expression opacity) create a stroke with color, width and opacity suppliedcreate a new default stylecreateStyle
(String typeName, Symbolizer symbolizer) create a new stylecreateStyle
(String typeName, Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a new stylecreateStyle
(Symbolizer symbolizer) create a new stylecreateStyle
(Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a new styleCreates a default text symbolizer.createTextSymbolizer
(Color color, Font[] fonts, String attributeName) create a textsymbolizercreateTextSymbolizer
(Color color, Font font, String attributeName) create a textsymbolizercreateTextSymbolizer
(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, String geometryPropertyName) create a text symbolizergetter for filterFactorygetter for StyleFactoryString[]
Returns the array of all the well known mark namesliteralExpression
(double value) create a literal expression representing the valueliteralExpression
(int value) create a literal expression representing the valueliteralExpression
(Object value) create a literal expression representing the valueliteralExpression
(String value) create a literal expression representing the valuevoid
setFilterFactory
(FilterFactory factory) Documented setter injection, StyleBuilder uses a StyleFactory for creation.void
setStyleFactory
(StyleFactory factory) Documented setter injection, StyleBuilder uses a StyleFactory for creation.
-
Field Details
-
LINE_JOIN_MITRE
- See Also:
-
LINE_JOIN_ROUND
- See Also:
-
LINE_JOIN_BEVEL
- See Also:
-
LINE_CAP_BUTT
- See Also:
-
LINE_CAP_ROUND
- See Also:
-
LINE_CAP_SQUARE
- See Also:
-
MARK_SQUARE
- See Also:
-
MARK_CIRCLE
- See Also:
-
MARK_TRIANGLE
- See Also:
-
MARK_STAR
- See Also:
-
MARK_CROSS
- See Also:
-
MARK_ARROW
- See Also:
-
MARK_X
- See Also:
-
FONT_STYLE_NORMAL
- See Also:
-
FONT_STYLE_ITALIC
- See Also:
-
FONT_STYLE_OBLIQUE
- See Also:
-
FONT_WEIGHT_NORMAL
- See Also:
-
FONT_WEIGHT_BOLD
- See Also:
-
-
Constructor Details
-
StyleBuilder
public StyleBuilder()use the default StyleFactory and FilterFactory -
StyleBuilder
Use the supplied StyleFactory when building styles- Parameters:
styleFactory
- the StyleFactory to use in building Styles
-
StyleBuilder
Use the supplied FilterFactory when building styles- Parameters:
filterFactory
- Use this FilterFactory to build the style
-
StyleBuilder
Use the supplied StyleFactory and FilterFactory when building styles- Parameters:
styleFactory
- the StyleFactory to usefilterFactory
- the FilterFactory to use
-
-
Method Details
-
setStyleFactory
Documented setter injection, StyleBuilder uses a StyleFactory for creation. -
getStyleFactory
getter for StyleFactory- Returns:
- the StyleFactory being used
-
setFilterFactory
Documented setter injection, StyleBuilder uses a StyleFactory for creation. -
getFilterFactory
getter for filterFactory- Returns:
- the FilterFactory being used
-
createStroke
create a default Stroke- Returns:
- the Stroke created
-
createStroke
create a default stroke with the supplied width- Parameters:
width
- the width of the line- Returns:
- the stroke created
-
createStroke
Create a default stroke with the supplied color- Parameters:
color
- the color of the line- Returns:
- the created stroke
-
createStroke
create a stroke with the supplied width and color- Parameters:
color
- the color of the linewidth
- the width of the line- Returns:
- the created stroke
-
createStroke
create a stroke with color, width, linejoin type and lineCap type.- Parameters:
color
- the color of the linewidth
- the width of the linelineJoin
- the type of join to be used at points along the linelineCap
- the type of cap to be used at the end of the line- Returns:
- the stroke created
-
createStroke
create a dashed line of color and width- Parameters:
color
- the color of the linewidth
- the width of the linedashArray
- an array of floats describing the length of line and spaces- Returns:
- the stroke created
-
createStroke
create a stroke with the color and width supplied- Parameters:
color
- an Expression representing the color of the linewidth
- an Expression representing the width of the line- Returns:
- the Stroke created
-
createStroke
create a stroke with color, width and opacity supplied- Parameters:
color
- the color of the linewidth
- the width of the lineopacity
- the opacity or see throughness of the line, 0 - is transparent, 1 is completely drawn- Returns:
- the stroke created
-
createStroke
create a stroke with color, width and opacity supplied- Parameters:
color
- an Expression representing the color of the linewidth
- an Expression representing the width of the lineopacity
- an Expression representing opacity the opacity or see throughness of the line, 0 - is transparent, 1 is completely drawn- Returns:
- the stroke created
-
createFill
create a default fill 50% gray- Returns:
- the fill created
-
createFill
create a fill of color- Parameters:
fillColor
- the color of the fill- Returns:
- the fill created
-
createFill
create a fill of color- Parameters:
fillColor
- an Expression representing the color of the fill- Returns:
- the fill constructed
-
createFill
create a fill with the supplied color and opacity- Parameters:
fillColor
- the color to fill withopacity
- the opacity of the fill 0 - transparent, 1 - completly filled- Returns:
- the fill created
-
createFill
create a fill with the supplied color and opacity- Parameters:
color
- an expression representing the color to fill withopacity
- an expression representing the opacity of the fill 0 - transparent, 1 - completly filled- Returns:
- the fill created
-
createFill
create a fill with color, background color and opacity supplied and uses the graphic supplied for the fill- Parameters:
color
- the foreground colorbackgroundColor
- the background coloropacity
- the opacity of the fillfill
- the graphic object to use to fill the fill- Returns:
- the fill created
-
createFill
public Fill createFill(Expression color, Expression backgroundColor, Expression opacity, Graphic fill) create a fill with color, background color and opacity supplied and uses the graphic supplied for the fill- Parameters:
color
- an Expression representing the foreground colorbackgroundColor
- an Expression representing the background coloropacity
- an Expression representing the opacity of the fillfill
- the graphic object to use to fill the fill- Returns:
- the fill created
-
getWellKnownMarkNames
Returns the array of all the well known mark names -
createMark
create the named mark- Parameters:
wellKnownName
- the wellknown name of the mark- Returns:
- the mark created
-
createMark
public 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 markfillColor
- the color of the markborderColor
- the outline color of the markborderWidth
- the width of the outline- Returns:
- the mark created
-
createMark
create a mark with default fill (50% gray) and the supplied outline- Parameters:
wellKnownName
- the well known name of the markborderColor
- the outline colorborderWidth
- the outline width- Returns:
- the mark created
-
createMark
create a mark of the supplied color and a default outline (black)- Parameters:
wellKnownName
- the well known name of the markfillColor
- the color of the mark- Returns:
- the created mark
-
createMark
create a mark with the supplied fill and stroke- Parameters:
wellKnownName
- the well known name of the markfill
- the fill to usestroke
- the stroke to use- Returns:
- the mark created
-
createMark
create a mark with the supplied fill and stroke- Parameters:
wellKnownName
- an Expression representing the well known name of the markfill
- the fill to usestroke
- the stroke to use- Returns:
- the mark created
-
createExternalGraphic
wrapper for stylefactory method- Parameters:
uri
- the uri of the imageformat
- mime type of the image- Returns:
- the external graphic
-
createExternalGraphic
wrapper for stylefactory method- Parameters:
url
- the url of the imageformat
- mime type of the image- Returns:
- the external graphic
-
createGraphic
Creates the default graphic object- Returns:
- the graphic object
-
createGraphic
creates a graphic object- Parameters:
externalGraphic
- an external graphic to use if displayablemark
- a mark to usesymbol
- a symbol to use- Returns:
- the graphic object
-
createGraphic
public Graphic createGraphic(ExternalGraphic externalGraphic, Mark mark, Symbol symbol, double opacity, double size, double rotation) creates a graphic object- Parameters:
externalGraphic
- an external graphic to use if displayablemark
- a mark to usesymbol
- a symbol to useopacity
- - the opacity of the graphicsize
- - the size of the graphicrotation
- - the rotation from the top of the page of the graphic- Returns:
- the graphic created
-
createGraphic
public Graphic createGraphic(ExternalGraphic[] externalGraphics, Mark[] marks, Symbol[] symbols, double opacity, double size, double rotation) creates a graphic object- Parameters:
externalGraphics
- an array of external graphics to use if displayablemarks
- an array of marks to usesymbols
- an array of symbols to useopacity
- - the opacity of the graphicsize
- - the size of the graphicrotation
- - the rotation from the top of the page of the graphic- Returns:
- the graphic created
-
createGraphic
public Graphic createGraphic(ExternalGraphic[] externalGraphics, Mark[] marks, Symbol[] symbols, Expression opacity, Expression size, Expression rotation) creates a graphic object- Parameters:
externalGraphics
- an array of external graphics to use if displayablemarks
- an array of marks to usesymbols
- an array of symbols to useopacity
- - an Expression representing the opacity of the graphicsize
- - an Expression representing the size of the graphicrotation
- - an Expression representing the rotation from the top of the page of the graphic- Returns:
- the graphic created
-
createAnchorPoint
wrapper round Stylefactory Method- Parameters:
x
- - the x coordinate of the anchory
- - the y coordinate of the anchor- Returns:
- the AnchorPoint created
-
createAnchorPoint
wrapper round Stylefactory Method- Parameters:
x
- - an Expression representing the x coordinate of the anchory
- - an Expression representing the y coordinate of the anchor- Returns:
- the AnchorPoint created
-
createDisplacement
wrapper round Stylefactory Method- Parameters:
x
- - the x displacementy
- - the y displacement- Returns:
- the Displacement created
-
createDisplacement
wrapper round Stylefactory Method- Parameters:
x
- - an Expression representing the x displacementy
- - an Expression representing the y displacement- Returns:
- the Displacement created
-
createPointPlacement
wrapper round Stylefactory Method- Returns:
- the default pointplacement
-
createPointPlacement
wrapper round Stylefactory Method- Parameters:
anchorX
- - the X coordinateanchorY
- - the Y coordinaterotation
- - the rotaion of the label- Returns:
- the pointplacement created
-
createPointPlacement
public PointPlacement createPointPlacement(double anchorX, double anchorY, double displacementX, double displacementY, double rotation) wrapper round Stylefactory Method- Parameters:
anchorX
- - the X coordinateanchorY
- - the Y coordinatedisplacementX
- - the X distance from the anchordisplacementY
- - the Y distance from the anchorrotation
- - the rotaion of the label- Returns:
- the pointplacement created
-
createPointPlacement
public PointPlacement createPointPlacement(AnchorPoint anchorPoint, Displacement displacement, Expression rotation) wrapper round Stylefactory Method- Parameters:
anchorPoint
- - the anchor point of the labeldisplacement
- - the displacement of the labelrotation
- - an Expresson representing the rotation of the label- Returns:
- the pointplacement created
-
createLinePlacement
wrapper round Stylefactory Method- Parameters:
offset
- - the distance between the line and the label- Returns:
- the LinePlacement created
-
createLinePlacement
wrapper round Stylefactory Method- Parameters:
offset
- - an Expression representing the distance between the line and the label- Returns:
- the LinePlacement created
-
createFont
create a geotools font object from a java font- Parameters:
font
- - the font to be converted- Returns:
- - the geotools font
-
createFont
create font of supplied family and size- Parameters:
fontFamily
- - the font familyfontSize
- - the size of the font in points- Returns:
- the font object created
-
createFont
create font of supplied family, size and weight/style- Parameters:
fontFamily
- - the font familyitalic
- - should the font be italic?bold
- - should the font be bold?fontSize
- - the size of the font in points- Returns:
- the new font object
-
createFont
public Font createFont(Expression fontFamily, Expression fontStyle, Expression fontWeight, Expression fontSize) wrapper round StyleFactory method- Parameters:
fontFamily
- - Expression representing Font familyfontStyle
- - Expression representing Font stylefontWeight
- - Expression representing Font weightfontSize
- - Expression representing Font size- Returns:
- the new font object
-
createHalo
wrapper round StyleFactory method to create default halo- Returns:
- the new halo
-
createHalo
wrapper round StyleFactory method to create halo- Parameters:
color
- - the color of the haloradius
- - the width of the halo- Returns:
- the new halo
-
createHalo
wrapper round StyleFactory method to create halo- Parameters:
color
- - the color of the haloopacity
- - the opacity of the halo fill 0 - transparent 1 - solidradius
- - the width of the halo- Returns:
- the new halo
-
createHalo
wrapper round StyleFactory method to create halo- Parameters:
fill
- - the fill of the haloradius
- - the width of the halo- Returns:
- the new halo
-
createHalo
wrapper round StyleFactory method to create halo- Parameters:
fill
- - the fill of the haloradius
- - an Expression representing the width of the halo- Returns:
- the new halo
-
createLineSymbolizer
create a default line symboliser- Returns:
- the new line symbolizer
-
createLineSymbolizer
create a new line symbolizer- Parameters:
width
- the width of the line- Returns:
- the new line symbolizer
-
createLineSymbolizer
create a LineSymbolizer- Parameters:
color
- - the color of the line- Returns:
- the new line symbolizer
-
createLineSymbolizer
create a LineSymbolizer- Parameters:
color
- - the color of the linewidth
- - the width of the line- Returns:
- the new line symbolizer
-
createLineSymbolizer
create a LineSymbolizer- Parameters:
color
- - the color of the linewidth
- - the width of the linegeometryPropertyName
- - the name of the geometry to be drawn- Returns:
- the new line symbolizer
-
createLineSymbolizer
create a LineSymbolizer- Parameters:
stroke
- - the stroke to be used to draw the line- Returns:
- the new line symbolizer
-
createLineSymbolizer
create a LineSymbolizer- Parameters:
stroke
- - the stroke to be used to draw the linegeometryPropertyName
- - the name of the geometry to be drawn- Returns:
- the new line symbolizer
-
createPolygonSymbolizer
create a default polygon symbolizer- Returns:
- the new polygon symbolizer
-
createPolygonSymbolizer
create a polygon symbolizer- Parameters:
fillColor
- - the color to fill the polygon- Returns:
- the new polygon symbolizer
-
createPolygonSymbolizer
public PolygonSymbolizer createPolygonSymbolizer(Color fillColor, Color borderColor, double borderWidth) create a polygon symbolizer- Parameters:
fillColor
- - the color to fill the polygonborderColor
- - the outline color of the polygonborderWidth
- - the width of the outline- Returns:
- the new polygon symbolizer
-
createPolygonSymbolizer
create a polygon symbolizer- Parameters:
borderColor
- - the outline color of the polygonborderWidth
- - the width of the outline- Returns:
- the new polygon symbolizer
-
createPolygonSymbolizer
create a polygon symbolizer- Parameters:
stroke
- - the stroke to use to outline the polygonfill
- - the fill to use to color the polygon- Returns:
- the new polygon symbolizer
-
createPolygonSymbolizer
public PolygonSymbolizer createPolygonSymbolizer(Stroke stroke, Fill fill, String geometryPropertyName) create a polygon symbolizer- Parameters:
stroke
- - the stroke to use to outline the polygonfill
- - the fill to use to color the polygongeometryPropertyName
- - the name of the geometry to be drawn- Returns:
- the new polygon symbolizer
-
createPointSymbolizer
create a default point symbolizer- Returns:
- the new point symbolizer
-
createPointSymbolizer
create a point symbolizer- Parameters:
graphic
- - the graphic object to draw at the point- Returns:
- the new point symbolizer
-
createPointSymbolizer
create a point symbolizer- Parameters:
graphic
- - the graphic object to draw at the pointgeometryPropertyName
- - the name of the geometry to be drawn- Returns:
- the new point symbolizer
-
createTextSymbolizer
Creates a default text symbolizer. Warning: there is no definition of a default text symbolizer in the SLD standard, this is provided just for convenience and uniformity with the other symbolizers- Returns:
- the default text symbolizer
-
createTextSymbolizer
public TextSymbolizer createTextSymbolizer(Color color, Font font, String attributeName) throws IllegalFilterException create a textsymbolizer- Parameters:
color
- the color of the textfont
- the font to useattributeName
- the attribute to use for the label- Returns:
- the new textsymbolizer
- Throws:
IllegalFilterException
- - if the attribute name does not exist
-
createTextSymbolizer
public TextSymbolizer createTextSymbolizer(Color color, Font[] fonts, String attributeName) throws IllegalFilterException create a textsymbolizer- Parameters:
color
- the color of the textfonts
- an array of fonts to use from the first to lastattributeName
- the attribute to use for the label- Returns:
- the new textsymbolizer
- Throws:
IllegalFilterException
- - if the attribute name does not exist
-
createStaticTextSymbolizer
create a textsymbolizer which doesn't change- Parameters:
color
- the color of the textfont
- the font to uselabel
- the label to use- Returns:
- the new textsymbolizer
-
createStaticTextSymbolizer
create a textsymbolizer which doesn't change- Parameters:
color
- the color of the textfonts
- an array of fonts to use from the first to lastlabel
- the label to use- Returns:
- the new textsymbolizer
-
createTextSymbolizer
public TextSymbolizer createTextSymbolizer(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, String geometryPropertyName) create a text symbolizer- Parameters:
fill
- - the fill to color the textfonts
- - an array of fonts to use from the first to lasthalo
- - the halo to be applied to the textlabel
- - Expression representing the labellabelPlacement
- - where to place the labelgeometryPropertyName
- - the name of the geometry to use- Returns:
- the new textsymbolizer
-
createFeatureTypeStyle
create a SimpleFeature type styler- Parameters:
symbolizer
- - the symbolizer to use- Returns:
- the new feature type styler
-
createRule
create a simple styling rule- Parameters:
symbolizer
- - the symbolizer to use- Returns:
- the new rule
-
createRule
reate a simple styling rule- Parameters:
symbolizers
- - an array of symbolizers to use- Returns:
- the new rule
-
createRule
public 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 useminScaleDenominator
- - the minimim scale to draw the feature atmaxScaleDenominator
- - the maximum scale to draw the feature at- Returns:
- the new rule
-
createRule
public 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 useminScaleDenominator
- - the minimim scale to draw the feature atmaxScaleDenominator
- - the maximum scale to draw the feature at- Returns:
- the new rule
-
createFeatureTypeStyle
public FeatureTypeStyle createFeatureTypeStyle(Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominators- Parameters:
symbolizer
- - the symbolizer to useminScaleDenominator
- - the minimim scale to draw the feature atmaxScaleDenominator
- - the maximum scale to draw the feature at- Returns:
- the new feature type styler
-
createFeatureTypeStyle
public FeatureTypeStyle createFeatureTypeStyle(Symbolizer[] symbolizers, double minScaleDenominator, double maxScaleDenominator) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominators- Parameters:
symbolizers
- - an array of symbolizers to useminScaleDenominator
- - the minimim scale to draw the feature atmaxScaleDenominator
- - the maximum scale to draw the feature at- Returns:
- the new feature type styler
-
createFeatureTypeStyle
create a SimpleFeature type styler- Parameters:
featureTypeName
- - name of the feature typesymbolizer
- - the symbolizer to use- Returns:
- the new feature type styler
-
createFeatureTypeStyle
create a SimpleFeature type styler- Parameters:
featureTypeName
- - name of the feature typesymbolizers
- - an array of symbolizers to use- Returns:
- the new feature type styler
-
createFeatureTypeStyle
public FeatureTypeStyle createFeatureTypeStyle(String typeName, Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominators- Parameters:
typeName
- - The feature typeName you want to draw (use "Feature" as a wild card to match all)symbolizer
- - the symbolizer to useminScaleDenominator
- - the minimim scale to draw the feature atmaxScaleDenominator
- - the maximum scale to draw the feature at- Returns:
- the new feature type styler
-
createFeatureTypeStyle
public FeatureTypeStyle createFeatureTypeStyle(String typeName, Symbolizer[] symbolizers, double minScaleDenominator, double maxScaleDenominator) create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominators- Parameters:
typeName
- - The feature typeName you want to draw (use "Feature" as a wild card to match all)symbolizers
- - an array of symbolizers to useminScaleDenominator
- - the minimim scale to draw the feature atmaxScaleDenominator
- - the maximum scale to draw the feature at- Returns:
- the new feature type styler
-
createFeatureTypeStyle
create a SimpleFeature type styler- Parameters:
typeName
- - The feature typeName you want to draw (use "Feature" as a wild card to match all)r
- - the rule that driver this feature typ style- Returns:
- the new feature type styler
-
createFeatureTypeStyle
create a SimpleFeature type styler see the SLD Spec for more details of scaleDenominators- Parameters:
typeName
- - The feature typeName you want to draw (use "Feature" as a wild card to match all)rules
- - the rules that make up the FeatureTypeStyle- Returns:
- the new feature type styler
-
createStyle
create a new style- Parameters:
symbolizer
- - the symbolizer to use- Returns:
- the new style
-
createStyle
public Style createStyle(Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a new style- Parameters:
symbolizer
- - the symbolizer to useminScaleDenominator
- - the minimim scale to draw the feature atmaxScaleDenominator
- - the maximum scale to draw the feature at- Returns:
- the new style
-
createStyle
create a new style- Parameters:
typeName
- - The feature typeName you want to draw (use "Feature" as a wild card to match all)symbolizer
- - the symbolizer to use- Returns:
- the new style
-
createStyle
public Style createStyle(String typeName, Symbolizer symbolizer, double minScaleDenominator, double maxScaleDenominator) create a new style- Parameters:
typeName
- - The feature typeName you want to draw (use "Feature" as a wild card to match all)symbolizer
- - the symbolizer to useminScaleDenominator
- - the minimim scale to draw the feature atmaxScaleDenominator
- - the maximum scale to draw the feature at- Returns:
- the new style
-
createStyle
create a new default style- Returns:
- the new style
-
colorExpression
convert an awt color in to a literal expression representing the color- Parameters:
color
- the color to encode- Returns:
- the expression
-
literalExpression
create a literal expression representing the value- Parameters:
value
- the value to be encoded- Returns:
- the expression
-
literalExpression
create a literal expression representing the value- Parameters:
value
- the value to be encoded- Returns:
- the expression
-
literalExpression
create a literal expression representing the value- Parameters:
value
- the value to be encoded- Returns:
- the expression
-
literalExpression
create a literal expression representing the value- Parameters:
value
- the value to be encoded- Returns:
- the expression
- Throws:
IllegalFilterException
-
attributeExpression
create an attribute expression- Parameters:
attributeName
- the attribute to use- Returns:
- the new expression
- Throws:
IllegalFilterException
- if the attribute name does not exist
-
buildClassifiedStyle
public Style buildClassifiedStyle(SimpleFeatureCollection fc, String name, String[] colors, SimpleFeatureType schema) throws IllegalFilterException given a feature collection and an array of colours build a style with the given number of classes on the named column- Throws:
IllegalFilterException
-
createRasterSymbolizer
Creates the default raster symbolizer -
createRasterSymbolizer
Creates a raster symbolizer- Parameters:
colorMap
- The symbolizer color mapopacity
- The whole layer opacity
-
createColorMap
Creates a color map based on fixed quantities and colors.- Parameters:
quantities
- The values that begin a category, or break points in a ramp, or isolated values, according to the type of color map specified by Typecolors
- The colors that will be associated to the categories, break points, or isolated valuestype
- Either @link ColorMap#TYPE_RAMP, @link ColorMap#TYPE_INTERVALS or @link ColorMap#TYPE_VALUES
-