Package org.geotools.styling
Class StyleFactoryImpl
- Object
-
- AbstractStyleFactory
-
- StyleFactoryImpl
-
- All Implemented Interfaces:
StyleFactory
,StyleFactory2
,Factory
,StyleFactory
public class StyleFactoryImpl extends AbstractStyleFactory implements StyleFactory2, StyleFactory
Factory for creating Styles. All style elements are returned as Interfaces from org.geotools.core as opposed to Implementations from org.geotools.defaultcore.This class implements:
- StyleFactory for SLD 1.0
- StyleFactory2 for our own extension to text mark allowing a graphic beyond text
- org.opengis.style.StyleFactory for SE 1.1
- Author:
- iant
-
-
Constructor Summary
Constructors Modifier Constructor Description StyleFactoryImpl()
protected
StyleFactoryImpl(FilterFactory2 factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnchorPoint
anchorPoint(Expression x, Expression y)
Indicate what part of a Graphic is used to mark the location.ChannelSelection
channelSelection(SelectedChannelType gray)
ChannelSelection
channelSelection(SelectedChannelType red, SelectedChannelType green, SelectedChannelType blue)
ColorMap
colorMap(Expression propertyName, Expression... mapping)
Wrap up a "Categorize" function using the provided expressions.ColorReplacementImpl
colorReplacement(Expression propertyName, Expression... mapping)
Wrap up a replacement function using the provided expressions.ContrastEnhancement
contrastEnhancement(Expression gamma, String method)
ContrastEnhancement
contrastEnhancement(Expression gamma, ContrastMethod method)
AnchorPoint
createAnchorPoint(Expression x, Expression y)
ChannelSelection
createChannelSelection(SelectedChannelType[] channels)
ColorMap
createColorMap()
ColorMapEntry
createColorMapEntry()
ContrastEnhancement
createContrastEnhancement()
ContrastEnhancement
createContrastEnhancement(Expression gammaValue)
ContrastMethod
createContrastMethod(ContrastMethod method)
Graphic
createDefaultGraphic()
Displacement
createDisplacement(Expression x, Expression y)
Extent
createExtent(String name, String value)
Creates a new extent.ExternalGraphic
createExternalGraphic(String uri, String format)
ExternalGraphic
createExternalGraphic(URL url, String format)
ExternalGraphic
createExternalGraphic(Icon inlineContent, String format)
FeatureTypeConstraint
createFeatureTypeConstraint(String featureTypeName, Filter filter, Extent[] extents)
Creates a new feature type constraint.FeatureTypeStyle
createFeatureTypeStyle()
FeatureTypeStyle
createFeatureTypeStyle(Rule[] rules)
Fill
createFill(Expression color)
Fill
createFill(Expression color, Expression opacity)
Fill
createFill(Expression color, Expression backgroundColor, Expression opacity, Graphic graphicFill)
Font
createFont(Expression fontFamily, Expression fontStyle, Expression fontWeight, Expression fontSize)
Graphic
createGraphic(ExternalGraphic[] externalGraphics, Mark[] marks, Symbol[] symbols, Expression opacity, Expression size, Expression rotation)
Halo
createHalo(Fill fill, Expression radius)
ImageOutline
createImageOutline(Symbolizer symbolizer)
Creates a new ImageOutline.LayerFeatureConstraints
createLayerFeatureConstraints(FeatureTypeConstraint[] featureTypeConstraints)
LinePlacement
createLinePlacement(Expression offset)
LineSymbolizer
createLineSymbolizer()
Create default line symbolizerLineSymbolizer
createLineSymbolizer(Stroke stroke, String geometryPropertyName)
Mark
createMark()
Mark
createMark(Expression wellKnownName, Stroke stroke, Fill fill, Expression size, Expression rotation)
NamedLayer
createNamedLayer()
NamedStyle
createNamedStyle()
PointPlacement
createPointPlacement(AnchorPoint anchorPoint, Displacement displacement, Expression rotation)
PointSymbolizer
createPointSymbolizer()
PointSymbolizer
createPointSymbolizer(Graphic graphic, String geometryPropertyName)
PolygonSymbolizer
createPolygonSymbolizer()
PolygonSymbolizer
createPolygonSymbolizer(Stroke stroke, Fill fill, String geometryPropertyName)
RasterSymbolizer
createRasterSymbolizer()
RasterSymbolizer
createRasterSymbolizer(String geometryPropertyName, Expression opacity, ChannelSelection channel, Expression overlap, ColorMap colorMap, ContrastEnhancement cenhancement, ShadedRelief relief, Symbolizer outline)
RemoteOWS
createRemoteOWS(String service, String onlineResource)
Rule
createRule()
Rule
createRule(Symbolizer[] symbolizers, Description desc, GraphicLegend legend, String name, Filter filter, boolean isElseFilter, double maxScale, double minScale)
SelectedChannelType
createSelectedChannelType(String name, ContrastEnhancement enhancement)
SelectedChannelType
createSelectedChannelType(Expression name, ContrastEnhancement enhancement)
SelectedChannelType
createSelectedChannelType(Expression name, Expression gammaValue)
ShadedRelief
createShadedRelief(Expression reliefFactor)
Stroke
createStroke(Expression color, Expression width)
A method to make a simple stroke of a provided color and width.Stroke
createStroke(Expression color, Expression width, Expression opacity)
A convienice method to make a simple strokeStroke
createStroke(Expression color, Expression width, Expression opacity, Expression lineJoin, Expression lineCap, float[] dashArray, Expression dashOffset, Graphic graphicFill, Graphic graphicStroke)
creates a strokeStyle
createStyle()
StyledLayerDescriptor
createStyledLayerDescriptor()
TextSymbolizer
createTextSymbolizer()
TextSymbolizer
createTextSymbolizer(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, String geometryPropertyName)
TextSymbolizer2
createTextSymbolizer(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, String geometryPropertyName, Graphic graphic)
Label Shield hack, non SLD 1.1UserLayer
createUserLayer()
Description
description(InternationalString title, InternationalString description)
Displacement
displacement(Expression dx, Expression dy)
Create DisplacementExtensionSymbolizer
extensionSymbolizer(String name, String propertyName, Description description, Unit<?> unit, String extensionName, Map<String,Expression> parameters)
Used to represent a symbolizer intended for a vendor specific rendering process.ExternalGraphic
externalGraphic(Icon inline, Collection<ColorReplacement> replacements)
Create ExternalGraphic using a Java Icon.ExternalGraphic
externalGraphic(OnLineResource resource, String format, Collection<ColorReplacement> replacements)
Create externalGraphicExternalMarkImpl
externalMark(Icon inline)
ExternalMarkImpl
externalMark(OnLineResource resource, String format, int markIndex)
FeatureTypeStyle
featureTypeStyle(String name, Description description, Id definedFor, Set<Name> featureTypeNames, Set<SemanticType> types, List<Rule> rules)
Direct FeatureTypeStyle creation (with no default SLD values applied).Fill
fill(GraphicFill fill, Expression color, Expression opacity)
Create fill.Font
font(List<Expression> family, Expression style, Expression weight, Expression size)
Create font entry; note this captures a list of font families in the preferred order, with the rendering engine choosing the first entry in the list available to the runtime environment.Mark
getCircleMark()
Convinence method for obtaining a mark of a fixed shapeMark
getCrossMark()
Convinence method for obtaining a mark of a fixed shapeFill
getDefaultFill()
Font
getDefaultFont()
Creates a defaultFont which is valid on all machines.Graphic
getDefaultGraphic()
LineSymbolizer
getDefaultLineSymbolizer()
Mark
getDefaultMark()
PointPlacement
getDefaultPointPlacement()
returns a default PointPlacement with a 0,0 anchorPoint and a displacement of 0,0 and a rotation of 0PointSymbolizer
getDefaultPointSymbolizer()
PolygonSymbolizer
getDefaultPolygonSymbolizer()
RasterSymbolizer
getDefaultRasterSymbolizer()
Stroke
getDefaultStroke()
Style
getDefaultStyle()
TextSymbolizer
getDefaultTextSymbolizer()
Creates a default Text Symbolizer, using the defaultFill, defaultFont and defaultPointPlacement, Sets the geometry attribute name to be geometry:text.Mark
getSquareMark()
Convinence method for obtaining a mark of a fixed shapeMark
getStarMark()
Convinence method for obtaining a mark of a fixed shapeMark
getTriangleMark()
Convinence method for obtaining a mark of a fixed shapeMark
getXMark()
Convinence method for obtaining a mark of a fixed shapeGraphic
graphic(List<GraphicalSymbol> symbols, Expression opacity, Expression size, Expression rotation, AnchorPoint anchor, Displacement disp)
Create a graphic.Graphic
graphicFill(List<GraphicalSymbol> symbols, Expression opacity, Expression size, Expression rotation, AnchorPoint anchorPoint, Displacement displacement)
GraphicLegend
graphicLegend(List<GraphicalSymbol> symbols, Expression opacity, Expression size, Expression rotation, AnchorPoint anchorPoint, Displacement displacement)
Graphic
graphicStroke(List<GraphicalSymbol> symbols, Expression opacity, Expression size, Expression rotation, AnchorPoint anchorPoint, Displacement displacement, Expression initialGap, Expression gap)
Halo
halo(Fill fill, Expression radius)
LinePlacement
linePlacement(Expression offset, Expression initialGap, Expression gap, boolean repeated, boolean aligned, boolean generalizedLine)
LineSymbolizer
lineSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Stroke stroke, Expression offset)
Mark
mark(Expression wellKnownName, Fill fill, Stroke stroke)
MarkImpl
mark(ExternalMark externalMark, Fill fill, Stroke stroke)
PointPlacement
pointPlacement(AnchorPoint anchor, Displacement displacement, Expression rotation)
PointSymbolizer
pointSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Graphic graphic)
Creation of a PointSymbolizer to describe how geometry can be rendered as a point.PolygonSymbolizer
polygonSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Stroke stroke, Fill fill, Displacement displacement, Expression offset)
RasterSymbolizer
rasterSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Expression opacity, ChannelSelection channelSelection, OverlapBehavior overlapsBehaviour, ColorMap colorMap, ContrastEnhancement contrast, ShadedRelief shaded, Symbolizer outline)
Rule
rule(String name, Description description, GraphicLegend legend, double min, double max, List<Symbolizer> symbolizers, Filter filter)
Create a rule from the provided definition.SelectedChannelType
selectedChannelType(String channelName, ContrastEnhancement contrastEnhancement)
SelectedChannelType
selectedChannelType(Expression channelName, ContrastEnhancement contrastEnhancement)
ShadedRelief
shadedRelief(Expression reliefFactor, boolean brightnessOnly)
Stroke
stroke(Expression color, Expression opacity, Expression width, Expression join, Expression cap, float[] dashes, Expression offset)
Stroke
stroke(GraphicFill fill, Expression color, Expression opacity, Expression width, Expression join, Expression cap, float[] dashes, Expression offset)
Stroke
stroke(GraphicStroke stroke, Expression color, Expression opacity, Expression width, Expression join, Expression cap, float[] dashes, Expression offset)
Style
style(String name, Description description, boolean isDefault, List<FeatureTypeStyle> featureTypeStyles, Symbolizer defaultSymbolizer)
TextSymbolizer
textSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Expression label, Font font, LabelPlacement placement, Halo halo, Fill fill)
Creation of a TextSymbolizer defining how labels are portrayed.-
Methods inherited from class AbstractStyleFactory
getImplementationHints
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Factory
getImplementationHints
-
-
-
-
Constructor Detail
-
StyleFactoryImpl
public StyleFactoryImpl()
-
StyleFactoryImpl
protected StyleFactoryImpl(FilterFactory2 factory)
-
-
Method Detail
-
createStyle
public Style createStyle()
- Specified by:
createStyle
in interfaceStyleFactory
- Specified by:
createStyle
in classAbstractStyleFactory
-
createNamedStyle
public NamedStyle createNamedStyle()
- Specified by:
createNamedStyle
in interfaceStyleFactory
- Specified by:
createNamedStyle
in classAbstractStyleFactory
-
createPointSymbolizer
public PointSymbolizer createPointSymbolizer()
- Specified by:
createPointSymbolizer
in interfaceStyleFactory
- Specified by:
createPointSymbolizer
in classAbstractStyleFactory
-
createPointSymbolizer
public PointSymbolizer createPointSymbolizer(Graphic graphic, String geometryPropertyName)
- Specified by:
createPointSymbolizer
in interfaceStyleFactory
- Specified by:
createPointSymbolizer
in classAbstractStyleFactory
-
createPolygonSymbolizer
public PolygonSymbolizer createPolygonSymbolizer()
- Specified by:
createPolygonSymbolizer
in interfaceStyleFactory
- Specified by:
createPolygonSymbolizer
in classAbstractStyleFactory
-
createPolygonSymbolizer
public PolygonSymbolizer createPolygonSymbolizer(Stroke stroke, Fill fill, String geometryPropertyName)
- Specified by:
createPolygonSymbolizer
in interfaceStyleFactory
- Specified by:
createPolygonSymbolizer
in classAbstractStyleFactory
-
createLineSymbolizer
public LineSymbolizer createLineSymbolizer()
Description copied from interface:StyleFactory
Create default line symbolizer- Specified by:
createLineSymbolizer
in interfaceStyleFactory
- Specified by:
createLineSymbolizer
in classAbstractStyleFactory
-
createLineSymbolizer
public LineSymbolizer createLineSymbolizer(Stroke stroke, String geometryPropertyName)
- Specified by:
createLineSymbolizer
in interfaceStyleFactory
- Specified by:
createLineSymbolizer
in classAbstractStyleFactory
-
createTextSymbolizer
public TextSymbolizer createTextSymbolizer()
- Specified by:
createTextSymbolizer
in interfaceStyleFactory
- Specified by:
createTextSymbolizer
in classAbstractStyleFactory
-
createTextSymbolizer
public TextSymbolizer createTextSymbolizer(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, String geometryPropertyName)
- Specified by:
createTextSymbolizer
in interfaceStyleFactory
- Specified by:
createTextSymbolizer
in classAbstractStyleFactory
-
createTextSymbolizer
public TextSymbolizer2 createTextSymbolizer(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, String geometryPropertyName, Graphic graphic)
Description copied from interface:StyleFactory2
Label Shield hack, non SLD 1.1- Specified by:
createTextSymbolizer
in interfaceStyleFactory2
- Parameters:
fill
- Fillfonts
- Font information (CSS)halo
- Describes Halolabel
- Expression for labellabelPlacement
- Captures label positiongeometryPropertyName
- With respect to this geometrygraphic
- Used to draw a backdrop behind label- Returns:
- TextSymbolizer2 allowing for a backdrop behind text label
-
createExtent
public Extent createExtent(String name, String value)
Description copied from interface:StyleFactory
Creates a new extent.- Specified by:
createExtent
in interfaceStyleFactory
- Parameters:
name
- The name of the extent.value
- The value of the extent.- Returns:
- The new extent.
-
createFeatureTypeConstraint
public FeatureTypeConstraint createFeatureTypeConstraint(String featureTypeName, Filter filter, Extent[] extents)
Description copied from interface:StyleFactory
Creates a new feature type constraint.- Specified by:
createFeatureTypeConstraint
in interfaceStyleFactory
- Parameters:
featureTypeName
- The feature type name.filter
- The filter.extents
- The extents.- Returns:
- The new feature type constaint.
-
createLayerFeatureConstraints
public LayerFeatureConstraints createLayerFeatureConstraints(FeatureTypeConstraint[] featureTypeConstraints)
- Specified by:
createLayerFeatureConstraints
in interfaceStyleFactory
-
createFeatureTypeStyle
public FeatureTypeStyle createFeatureTypeStyle()
- Specified by:
createFeatureTypeStyle
in interfaceStyleFactory
- Specified by:
createFeatureTypeStyle
in classAbstractStyleFactory
-
createFeatureTypeStyle
public FeatureTypeStyle createFeatureTypeStyle(Rule[] rules)
- Specified by:
createFeatureTypeStyle
in interfaceStyleFactory
- Specified by:
createFeatureTypeStyle
in classAbstractStyleFactory
-
createRule
public Rule createRule()
- Specified by:
createRule
in interfaceStyleFactory
- Specified by:
createRule
in classAbstractStyleFactory
-
createRule
public Rule createRule(Symbolizer[] symbolizers, Description desc, GraphicLegend legend, String name, Filter filter, boolean isElseFilter, double maxScale, double minScale)
-
createImageOutline
public ImageOutline createImageOutline(Symbolizer symbolizer)
Description copied from interface:StyleFactory
Creates a new ImageOutline.- Specified by:
createImageOutline
in interfaceStyleFactory
- Parameters:
symbolizer
- A line or polygon symbolizer.- Returns:
- The new image outline.
-
createStroke
public Stroke createStroke(Expression color, Expression width)
A method to make a simple stroke of a provided color and width.- Specified by:
createStroke
in interfaceStyleFactory
- Specified by:
createStroke
in classAbstractStyleFactory
- Parameters:
color
- the color of the linewidth
- the width of the line- Returns:
- the stroke object
- See Also:
org.geotools.stroke
-
createStroke
public Stroke createStroke(Expression color, Expression width, Expression opacity)
A convienice method to make a simple stroke- Specified by:
createStroke
in interfaceStyleFactory
- Specified by:
createStroke
in classAbstractStyleFactory
- Parameters:
color
- the color of the linewidth
- The width of the lineopacity
- The opacity of the line- Returns:
- The stroke
- See Also:
org.geotools.stroke
-
createStroke
public Stroke createStroke(Expression color, Expression width, Expression opacity, Expression lineJoin, Expression lineCap, float[] dashArray, Expression dashOffset, Graphic graphicFill, Graphic graphicStroke)
creates a stroke- Specified by:
createStroke
in interfaceStyleFactory
- Specified by:
createStroke
in classAbstractStyleFactory
- Parameters:
color
- The color of the linewidth
- The width of the lineopacity
- The opacity of the linelineJoin
- - the type of Line jointlineCap
- - the type of line capdashArray
- - an array of floats describing the dashes in the linedashOffset
- - where in the dash array to start drawing fromgraphicFill
- - a graphic object to fill the line withgraphicStroke
- - a graphic object to draw the line with- Returns:
- The completed stroke.
- See Also:
org.geotools.stroke
-
createFill
public Fill createFill(Expression color, Expression backgroundColor, Expression opacity, Graphic graphicFill)
- Specified by:
createFill
in interfaceStyleFactory
- Specified by:
createFill
in classAbstractStyleFactory
-
createFill
public Fill createFill(Expression color, Expression opacity)
- Specified by:
createFill
in interfaceStyleFactory
- Specified by:
createFill
in classAbstractStyleFactory
-
createFill
public Fill createFill(Expression color)
- Specified by:
createFill
in interfaceStyleFactory
- Specified by:
createFill
in classAbstractStyleFactory
-
createMark
public Mark createMark(Expression wellKnownName, Stroke stroke, Fill fill, Expression size, Expression rotation)
- Specified by:
createMark
in interfaceStyleFactory
- Specified by:
createMark
in classAbstractStyleFactory
-
getSquareMark
public Mark getSquareMark()
Description copied from class:AbstractStyleFactory
Convinence method for obtaining a mark of a fixed shape- Specified by:
getSquareMark
in interfaceStyleFactory
- Specified by:
getSquareMark
in classAbstractStyleFactory
- Returns:
- a Mark that matches the name in this method.
-
getCircleMark
public Mark getCircleMark()
Description copied from class:AbstractStyleFactory
Convinence method for obtaining a mark of a fixed shape- Specified by:
getCircleMark
in interfaceStyleFactory
- Specified by:
getCircleMark
in classAbstractStyleFactory
- Returns:
- a Mark that matches the name in this method.
-
getCrossMark
public Mark getCrossMark()
Description copied from class:AbstractStyleFactory
Convinence method for obtaining a mark of a fixed shape- Specified by:
getCrossMark
in interfaceStyleFactory
- Specified by:
getCrossMark
in classAbstractStyleFactory
- Returns:
- a Mark that matches the name in this method.
-
getXMark
public Mark getXMark()
Description copied from class:AbstractStyleFactory
Convinence method for obtaining a mark of a fixed shape- Specified by:
getXMark
in interfaceStyleFactory
- Specified by:
getXMark
in classAbstractStyleFactory
- Returns:
- a Mark that matches the name in this method.
-
getTriangleMark
public Mark getTriangleMark()
Description copied from class:AbstractStyleFactory
Convinence method for obtaining a mark of a fixed shape- Specified by:
getTriangleMark
in interfaceStyleFactory
- Specified by:
getTriangleMark
in classAbstractStyleFactory
- Returns:
- a Mark that matches the name in this method.
-
getStarMark
public Mark getStarMark()
Description copied from class:AbstractStyleFactory
Convinence method for obtaining a mark of a fixed shape- Specified by:
getStarMark
in interfaceStyleFactory
- Specified by:
getStarMark
in classAbstractStyleFactory
- Returns:
- a Mark that matches the name in this method.
-
createMark
public Mark createMark()
- Specified by:
createMark
in interfaceStyleFactory
- Specified by:
createMark
in classAbstractStyleFactory
-
createGraphic
public Graphic createGraphic(ExternalGraphic[] externalGraphics, Mark[] marks, Symbol[] symbols, Expression opacity, Expression size, Expression rotation)
- Specified by:
createGraphic
in interfaceStyleFactory
- Specified by:
createGraphic
in classAbstractStyleFactory
-
createExternalGraphic
public ExternalGraphic createExternalGraphic(String uri, String format)
- Specified by:
createExternalGraphic
in interfaceStyleFactory
- Specified by:
createExternalGraphic
in classAbstractStyleFactory
-
createExternalGraphic
public ExternalGraphic createExternalGraphic(Icon inlineContent, String format)
- Specified by:
createExternalGraphic
in interfaceStyleFactory
- Specified by:
createExternalGraphic
in classAbstractStyleFactory
-
createExternalGraphic
public ExternalGraphic createExternalGraphic(URL url, String format)
- Specified by:
createExternalGraphic
in interfaceStyleFactory
- Specified by:
createExternalGraphic
in classAbstractStyleFactory
-
createFont
public Font createFont(Expression fontFamily, Expression fontStyle, Expression fontWeight, Expression fontSize)
- Specified by:
createFont
in interfaceStyleFactory
- Specified by:
createFont
in classAbstractStyleFactory
-
createLinePlacement
public LinePlacement createLinePlacement(Expression offset)
- Specified by:
createLinePlacement
in interfaceStyleFactory
- Specified by:
createLinePlacement
in classAbstractStyleFactory
-
createPointPlacement
public PointPlacement createPointPlacement(AnchorPoint anchorPoint, Displacement displacement, Expression rotation)
- Specified by:
createPointPlacement
in interfaceStyleFactory
- Specified by:
createPointPlacement
in classAbstractStyleFactory
-
createAnchorPoint
public AnchorPoint createAnchorPoint(Expression x, Expression y)
- Specified by:
createAnchorPoint
in interfaceStyleFactory
- Specified by:
createAnchorPoint
in classAbstractStyleFactory
-
createDisplacement
public Displacement createDisplacement(Expression x, Expression y)
- Specified by:
createDisplacement
in interfaceStyleFactory
- Specified by:
createDisplacement
in classAbstractStyleFactory
-
createHalo
public Halo createHalo(Fill fill, Expression radius)
- Specified by:
createHalo
in interfaceStyleFactory
- Specified by:
createHalo
in classAbstractStyleFactory
-
getDefaultFill
public Fill getDefaultFill()
- Specified by:
getDefaultFill
in interfaceStyleFactory
- Specified by:
getDefaultFill
in classAbstractStyleFactory
-
getDefaultLineSymbolizer
public LineSymbolizer getDefaultLineSymbolizer()
- Specified by:
getDefaultLineSymbolizer
in interfaceStyleFactory
- Specified by:
getDefaultLineSymbolizer
in classAbstractStyleFactory
-
getDefaultMark
public Mark getDefaultMark()
- Specified by:
getDefaultMark
in interfaceStyleFactory
- Specified by:
getDefaultMark
in classAbstractStyleFactory
-
getDefaultPointSymbolizer
public PointSymbolizer getDefaultPointSymbolizer()
- Specified by:
getDefaultPointSymbolizer
in interfaceStyleFactory
- Specified by:
getDefaultPointSymbolizer
in classAbstractStyleFactory
-
getDefaultPolygonSymbolizer
public PolygonSymbolizer getDefaultPolygonSymbolizer()
- Specified by:
getDefaultPolygonSymbolizer
in interfaceStyleFactory
- Specified by:
getDefaultPolygonSymbolizer
in classAbstractStyleFactory
-
getDefaultStroke
public Stroke getDefaultStroke()
- Specified by:
getDefaultStroke
in interfaceStyleFactory
- Specified by:
getDefaultStroke
in classAbstractStyleFactory
-
getDefaultStyle
public Style getDefaultStyle()
- Specified by:
getDefaultStyle
in interfaceStyleFactory
- Specified by:
getDefaultStyle
in classAbstractStyleFactory
-
getDefaultTextSymbolizer
public TextSymbolizer getDefaultTextSymbolizer()
Creates a default Text Symbolizer, using the defaultFill, defaultFont and defaultPointPlacement, Sets the geometry attribute name to be geometry:text. No Halo is set. The label is not set- Specified by:
getDefaultTextSymbolizer
in interfaceStyleFactory
- Specified by:
getDefaultTextSymbolizer
in classAbstractStyleFactory
- Returns:
- A default TextSymbolizer
-
getDefaultFont
public Font getDefaultFont()
Creates a defaultFont which is valid on all machines. The font is of size 10, Style and Weight normal and uses a serif font.- Specified by:
getDefaultFont
in interfaceStyleFactory
- Specified by:
getDefaultFont
in classAbstractStyleFactory
- Returns:
- the default Font
-
createDefaultGraphic
public Graphic createDefaultGraphic()
- Specified by:
createDefaultGraphic
in interfaceStyleFactory
-
getDefaultGraphic
public Graphic getDefaultGraphic()
- Specified by:
getDefaultGraphic
in interfaceStyleFactory
- Specified by:
getDefaultGraphic
in classAbstractStyleFactory
-
getDefaultPointPlacement
public PointPlacement getDefaultPointPlacement()
returns a default PointPlacement with a 0,0 anchorPoint and a displacement of 0,0 and a rotation of 0- Specified by:
getDefaultPointPlacement
in interfaceStyleFactory
- Specified by:
getDefaultPointPlacement
in classAbstractStyleFactory
- Returns:
- a default PointPlacement.
-
createRasterSymbolizer
public RasterSymbolizer createRasterSymbolizer()
- Specified by:
createRasterSymbolizer
in interfaceStyleFactory
-
createRasterSymbolizer
public RasterSymbolizer createRasterSymbolizer(String geometryPropertyName, Expression opacity, ChannelSelection channel, Expression overlap, ColorMap colorMap, ContrastEnhancement cenhancement, ShadedRelief relief, Symbolizer outline)
- Specified by:
createRasterSymbolizer
in interfaceStyleFactory
- Specified by:
createRasterSymbolizer
in classAbstractStyleFactory
-
getDefaultRasterSymbolizer
public RasterSymbolizer getDefaultRasterSymbolizer()
- Specified by:
getDefaultRasterSymbolizer
in interfaceStyleFactory
- Specified by:
getDefaultRasterSymbolizer
in classAbstractStyleFactory
-
createChannelSelection
public ChannelSelection createChannelSelection(SelectedChannelType[] channels)
- Specified by:
createChannelSelection
in interfaceStyleFactory
-
createColorMap
public ColorMap createColorMap()
- Specified by:
createColorMap
in interfaceStyleFactory
- Specified by:
createColorMap
in classAbstractStyleFactory
-
createColorMapEntry
public ColorMapEntry createColorMapEntry()
- Specified by:
createColorMapEntry
in interfaceStyleFactory
- Specified by:
createColorMapEntry
in classAbstractStyleFactory
-
createContrastEnhancement
public ContrastEnhancement createContrastEnhancement()
- Specified by:
createContrastEnhancement
in interfaceStyleFactory
-
createContrastEnhancement
public ContrastEnhancement createContrastEnhancement(Expression gammaValue)
- Specified by:
createContrastEnhancement
in interfaceStyleFactory
-
createSelectedChannelType
public SelectedChannelType createSelectedChannelType(Expression name, ContrastEnhancement enhancement)
- Specified by:
createSelectedChannelType
in interfaceStyleFactory
-
createSelectedChannelType
public SelectedChannelType createSelectedChannelType(String name, ContrastEnhancement enhancement)
- Specified by:
createSelectedChannelType
in interfaceStyleFactory
- Specified by:
createSelectedChannelType
in classAbstractStyleFactory
-
createSelectedChannelType
public SelectedChannelType createSelectedChannelType(Expression name, Expression gammaValue)
- Specified by:
createSelectedChannelType
in interfaceStyleFactory
- Specified by:
createSelectedChannelType
in classAbstractStyleFactory
-
createStyledLayerDescriptor
public StyledLayerDescriptor createStyledLayerDescriptor()
- Specified by:
createStyledLayerDescriptor
in interfaceStyleFactory
-
createUserLayer
public UserLayer createUserLayer()
- Specified by:
createUserLayer
in interfaceStyleFactory
-
createNamedLayer
public NamedLayer createNamedLayer()
- Specified by:
createNamedLayer
in interfaceStyleFactory
-
createRemoteOWS
public RemoteOWS createRemoteOWS(String service, String onlineResource)
- Specified by:
createRemoteOWS
in interfaceStyleFactory
-
createShadedRelief
public ShadedRelief createShadedRelief(Expression reliefFactor)
- Specified by:
createShadedRelief
in interfaceStyleFactory
-
anchorPoint
public AnchorPoint anchorPoint(Expression x, Expression y)
Description copied from interface:StyleFactory
Indicate what part of a Graphic is used to mark the location.- Specified by:
anchorPoint
in interfaceStyleFactory
- Specified by:
anchorPoint
in interfaceStyleFactory
-
channelSelection
public ChannelSelection channelSelection(SelectedChannelType gray)
- Specified by:
channelSelection
in interfaceStyleFactory
- Specified by:
channelSelection
in interfaceStyleFactory
-
channelSelection
public ChannelSelection channelSelection(SelectedChannelType red, SelectedChannelType green, SelectedChannelType blue)
- Specified by:
channelSelection
in interfaceStyleFactory
- Specified by:
channelSelection
in interfaceStyleFactory
-
colorMap
public ColorMap colorMap(Expression propertyName, Expression... mapping)
Description copied from interface:StyleFactory
Wrap up a "Categorize" function using the provided expressions.The function will be created based on:
- PropertyName; use "Rasterdata" to indicate this is a color map
- Literal: lookup value
- Literal: threshold 1
- Literal: value 1
- Literal: threshold 2
- Literal: value 2
- Literal: (Optional) succeeding or preceding
- Specified by:
colorMap
in interfaceStyleFactory
- Specified by:
colorMap
in interfaceStyleFactory
- Parameters:
propertyName
- Property name to categorize, or use "Raster"mapping
- Defined as a series of Expressions- Returns:
- ColorMap wrapped around the "Cateogize" function
-
colorReplacement
public ColorReplacementImpl colorReplacement(Expression propertyName, Expression... mapping)
Description copied from interface:StyleFactory
Wrap up a replacement function using the provided expressions.- Specified by:
colorReplacement
in interfaceStyleFactory
- Specified by:
colorReplacement
in interfaceStyleFactory
- Parameters:
propertyName
- Property name to categorize, or use "Raster"mapping
- Defined as a series of Expressions- Returns:
- ColorReplacement wrapped around a Function
-
contrastEnhancement
public ContrastEnhancement contrastEnhancement(Expression gamma, ContrastMethod method)
- Specified by:
contrastEnhancement
in interfaceStyleFactory
- Specified by:
contrastEnhancement
in interfaceStyleFactory
-
description
public Description description(InternationalString title, InternationalString description)
- Specified by:
description
in interfaceStyleFactory
- Specified by:
description
in interfaceStyleFactory
-
displacement
public Displacement displacement(Expression dx, Expression dy)
Description copied from interface:StyleFactory
Create Displacement- Specified by:
displacement
in interfaceStyleFactory
- Specified by:
displacement
in interfaceStyleFactory
-
externalGraphic
public ExternalGraphic externalGraphic(Icon inline, Collection<ColorReplacement> replacements)
Description copied from interface:StyleFactory
Create ExternalGraphic using a Java Icon.This is used to produce high quality output by allowing you to directly draw each symbol by supplying your own Icon implementation.
- Specified by:
externalGraphic
in interfaceStyleFactory
- Specified by:
externalGraphic
in interfaceStyleFactory
-
externalGraphic
public ExternalGraphic externalGraphic(OnLineResource resource, String format, Collection<ColorReplacement> replacements)
Description copied from interface:StyleFactory
Create externalGraphic- Specified by:
externalGraphic
in interfaceStyleFactory
- Specified by:
externalGraphic
in interfaceStyleFactory
-
externalMark
public ExternalMarkImpl externalMark(Icon inline)
- Specified by:
externalMark
in interfaceStyleFactory
- Specified by:
externalMark
in interfaceStyleFactory
-
externalMark
public ExternalMarkImpl externalMark(OnLineResource resource, String format, int markIndex)
- Specified by:
externalMark
in interfaceStyleFactory
- Specified by:
externalMark
in interfaceStyleFactory
-
featureTypeStyle
public FeatureTypeStyle featureTypeStyle(String name, Description description, Id definedFor, Set<Name> featureTypeNames, Set<SemanticType> types, List<Rule> rules)
Description copied from interface:StyleFactory
Direct FeatureTypeStyle creation (with no default SLD values applied).- Specified by:
featureTypeStyle
in interfaceStyleFactory
- Specified by:
featureTypeStyle
in interfaceStyleFactory
- Parameters:
name
- Namedescription
- Description with title and abstract informationdefinedFor
- Currently unusedfeatureTypeNames
- FeatureTypes this style applies to, use AbstractFeature to match alltypes
- SemanticTyperules
- May not be null or empty- Returns:
- feature type style
- See Also:
SimpleFe
-
fill
public Fill fill(GraphicFill fill, Expression color, Expression opacity)
Description copied from interface:StyleFactory
Create fill.- Specified by:
fill
in interfaceStyleFactory
- Specified by:
fill
in interfaceStyleFactory
-
font
public Font font(List<Expression> family, Expression style, Expression weight, Expression size)
Description copied from interface:StyleFactory
Create font entry; note this captures a list of font families in the preferred order, with the rendering engine choosing the first entry in the list available to the runtime environment.If fonts are not showing up as you expect please review the list of fonts installed into your JRE.
- Specified by:
font
in interfaceStyleFactory
- Specified by:
font
in interfaceStyleFactory
- Returns:
- Font
-
graphic
public Graphic graphic(List<GraphicalSymbol> symbols, Expression opacity, Expression size, Expression rotation, AnchorPoint anchor, Displacement disp)
Description copied from interface:StyleFactory
Create a graphic.- Specified by:
graphic
in interfaceStyleFactory
- Specified by:
graphic
in interfaceStyleFactory
-
graphicFill
public Graphic graphicFill(List<GraphicalSymbol> symbols, Expression opacity, Expression size, Expression rotation, AnchorPoint anchorPoint, Displacement displacement)
- Specified by:
graphicFill
in interfaceStyleFactory
- Specified by:
graphicFill
in interfaceStyleFactory
-
graphicLegend
public GraphicLegend graphicLegend(List<GraphicalSymbol> symbols, Expression opacity, Expression size, Expression rotation, AnchorPoint anchorPoint, Displacement displacement)
- Specified by:
graphicLegend
in interfaceStyleFactory
- Specified by:
graphicLegend
in interfaceStyleFactory
-
graphicStroke
public Graphic graphicStroke(List<GraphicalSymbol> symbols, Expression opacity, Expression size, Expression rotation, AnchorPoint anchorPoint, Displacement displacement, Expression initialGap, Expression gap)
- Specified by:
graphicStroke
in interfaceStyleFactory
- Specified by:
graphicStroke
in interfaceStyleFactory
-
halo
public Halo halo(Fill fill, Expression radius)
- Specified by:
halo
in interfaceStyleFactory
- Specified by:
halo
in interfaceStyleFactory
-
linePlacement
public LinePlacement linePlacement(Expression offset, Expression initialGap, Expression gap, boolean repeated, boolean aligned, boolean generalizedLine)
- Specified by:
linePlacement
in interfaceStyleFactory
- Specified by:
linePlacement
in interfaceStyleFactory
-
lineSymbolizer
public LineSymbolizer lineSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Stroke stroke, Expression offset)
- Specified by:
lineSymbolizer
in interfaceStyleFactory
- Specified by:
lineSymbolizer
in interfaceStyleFactory
- Parameters:
name
- handle used to refer to this symbolizer (machine readible)geometry
- Expression used to produce the Geometry to renderer; often a PropertyNameunit
- Unit of measure used to define this symbolizerstroke
- Definition of how to stroke lineworkoffset
- Offset used to position line relative to origional- Returns:
- Newly created Line Symbolizer
-
mark
public Mark mark(Expression wellKnownName, Fill fill, Stroke stroke)
- Specified by:
mark
in interfaceStyleFactory
- Specified by:
mark
in interfaceStyleFactory
-
mark
public MarkImpl mark(ExternalMark externalMark, Fill fill, Stroke stroke)
- Specified by:
mark
in interfaceStyleFactory
- Specified by:
mark
in interfaceStyleFactory
-
pointPlacement
public PointPlacement pointPlacement(AnchorPoint anchor, Displacement displacement, Expression rotation)
- Specified by:
pointPlacement
in interfaceStyleFactory
- Specified by:
pointPlacement
in interfaceStyleFactory
-
pointSymbolizer
public PointSymbolizer pointSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Graphic graphic)
Description copied from interface:StyleFactory
Creation of a PointSymbolizer to describe how geometry can be rendered as a point.- Specified by:
pointSymbolizer
in interfaceStyleFactory
- Specified by:
pointSymbolizer
in interfaceStyleFactory
- Parameters:
name
- handle used to refer to this symbolizer (machine readable)geometry
- Expression used to extract the Geometry rendered; usually a PropertyNamedescription
- Human readable description of symboizerunit
- Unit of Measure used to interpret symbolizer distancesgraphic
- Graphic used to represent the geometry when rendering- Returns:
- Newly created PointSymbolizer
-
polygonSymbolizer
public PolygonSymbolizer polygonSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Stroke stroke, Fill fill, Displacement displacement, Expression offset)
- Specified by:
polygonSymbolizer
in interfaceStyleFactory
- Specified by:
polygonSymbolizer
in interfaceStyleFactory
- Parameters:
name
- handle used to refer to this symbolizer (machine readable)geometry
- Expression used to extract the Geometry rendered; usually a PropertyNamedescription
- Human readable description of symboizerunit
- Unit of Measure used to interpret symbolizer distances
-
rasterSymbolizer
public RasterSymbolizer rasterSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Expression opacity, ChannelSelection channelSelection, OverlapBehavior overlapsBehaviour, ColorMap colorMap, ContrastEnhancement contrast, ShadedRelief shaded, Symbolizer outline)
- Specified by:
rasterSymbolizer
in interfaceStyleFactory
- Specified by:
rasterSymbolizer
in interfaceStyleFactory
- Parameters:
name
- handle used to refer to this symbolizer (machine readable)geometry
- Expression used to extract the Geometry rendered; usually a PropertyNamedescription
- Human readable description of symboizerunit
- Unit of Measure used to interpret symbolizer distances- Returns:
- RasterSymbolizer
-
extensionSymbolizer
public ExtensionSymbolizer extensionSymbolizer(String name, String propertyName, Description description, Unit<?> unit, String extensionName, Map<String,Expression> parameters)
Description copied from interface:StyleFactory
Used to represent a symbolizer intended for a vendor specific rendering process. This facility should be used to control subject matter that is beyond the scope of the traditional symbology encoding data structure (subject matter like wind barbs or extra deegrees of freedom like temporal symbolizers are good examples of the use of this facility).- Specified by:
extensionSymbolizer
in interfaceStyleFactory
- Specified by:
extensionSymbolizer
in interfaceStyleFactory
- Parameters:
name
- handle used to refer to this symbolizer (machine readible)propertyName
- Geometry expression to renderer; formally a PropertyNamedescription
- Description of this symbolizer; human readableunit
- Unit of measure to use when interpretting this symbolizerextensionName
- Extension name used to identify the vendor specific extension being controlledparameters
- Named expressions used to configure the vendor specific rendering process- Returns:
- newly created ExtensionSymbolizer
-
rule
public Rule rule(String name, Description description, GraphicLegend legend, double min, double max, List<Symbolizer> symbolizers, Filter filter)
Description copied from interface:StyleFactory
Create a rule from the provided definition.- Specified by:
rule
in interfaceStyleFactory
- Specified by:
rule
in interfaceStyleFactory
- Parameters:
name
- handle used to refer to this rule (machine readable)description
- Human readable description of this rulelegend
- Graphic used to indicate this rule in a legend or user interfacemin
- minimum scale denominator used to control when this rule is appliedmax
- maximum scale denominator used to control when this rule is applied- Returns:
- Newly created Rule
-
selectedChannelType
public SelectedChannelType selectedChannelType(Expression channelName, ContrastEnhancement contrastEnhancement)
- Specified by:
selectedChannelType
in interfaceStyleFactory
- Specified by:
selectedChannelType
in interfaceStyleFactory
- Returns:
- SelectedChannelType
-
selectedChannelType
public SelectedChannelType selectedChannelType(String channelName, ContrastEnhancement contrastEnhancement)
- Specified by:
selectedChannelType
in interfaceStyleFactory
- Specified by:
selectedChannelType
in interfaceStyleFactory
- Returns:
- SelectedChannelType
-
shadedRelief
public ShadedRelief shadedRelief(Expression reliefFactor, boolean brightnessOnly)
- Specified by:
shadedRelief
in interfaceStyleFactory
- Specified by:
shadedRelief
in interfaceStyleFactory
- Returns:
- ShadedRelief
-
stroke
public Stroke stroke(Expression color, Expression opacity, Expression width, Expression join, Expression cap, float[] dashes, Expression offset)
- Specified by:
stroke
in interfaceStyleFactory
- Specified by:
stroke
in interfaceStyleFactory
-
stroke
public Stroke stroke(GraphicFill fill, Expression color, Expression opacity, Expression width, Expression join, Expression cap, float[] dashes, Expression offset)
- Specified by:
stroke
in interfaceStyleFactory
- Specified by:
stroke
in interfaceStyleFactory
-
stroke
public Stroke stroke(GraphicStroke stroke, Expression color, Expression opacity, Expression width, Expression join, Expression cap, float[] dashes, Expression offset)
- Specified by:
stroke
in interfaceStyleFactory
- Specified by:
stroke
in interfaceStyleFactory
-
style
public Style style(String name, Description description, boolean isDefault, List<FeatureTypeStyle> featureTypeStyles, Symbolizer defaultSymbolizer)
- Specified by:
style
in interfaceStyleFactory
- Specified by:
style
in interfaceStyleFactory
-
textSymbolizer
public TextSymbolizer textSymbolizer(String name, Expression geometry, Description description, Unit<?> unit, Expression label, Font font, LabelPlacement placement, Halo halo, Fill fill)
Description copied from interface:StyleFactory
Creation of a TextSymbolizer defining how labels are portrayed.- Specified by:
textSymbolizer
in interfaceStyleFactory
- Specified by:
textSymbolizer
in interfaceStyleFactory
- Parameters:
name
- Handle used to refer to this symbolizer (machine readable)geometry
- Geometry to be rendereddescription
- Human readable descriptionunit
- Unit of measure used to interpret symbolizer sizeslabel
- Text displayed for this symbolizerfont
- Font selected to renderer this symbolizerplacement
- Placement information relative to orgiginal geometryhalo
- definition of a halo or outline surrounding the symbolizerfill
- definition of fill used- Returns:
- newly created TextSymbolizer
-
contrastEnhancement
public ContrastEnhancement contrastEnhancement(Expression gamma, String method)
- Specified by:
contrastEnhancement
in interfaceStyleFactory
-
createContrastMethod
public ContrastMethod createContrastMethod(ContrastMethod method)
- Specified by:
createContrastMethod
in interfaceStyleFactory
- Returns:
- a deep copy of the method
-
-