Package org.geotools.styling
Class AbstractSymbolizer
Object
AbstractSymbolizer
- All Implemented Interfaces:
Symbolizer
- Direct Known Subclasses:
LineSymbolizerImpl,PointSymbolizerImpl,PolygonSymbolizerImpl,RasterSymbolizerImpl,TextSymbolizerImpl,VendorSymbolizerImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Descriptionprotected Expressionprotected Stringprotected Unit<Length> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSymbolizer(String name, Description description, String geometryPropertyName, Unit<Length> unitOfMeasure) AbstractSymbolizer(String name, Description description, Expression geometry, Unit<Length> unitOfMeasure) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the description of this symbolizer.This defines the geometry to be used for styling.
The property is optional and if it is absent (null) then the "default" geometry property of the feature should be used.
Typically, features only have one geometry so, in general, the need to select one is not required.
The expression can also build a new geometry out of existing attributes or transform an existing geometry.Returns the name of the geometry feature attribute to use for drawing.getName()Returns a name for this symbolizer.Map of vendor options for the symbolizer.Unit<Length>Returns a measure unit.inthashCode()booleanDetermines if a vendor option with the specific key has been set on this symbolizer.voidsetDescription(Description description) Tile and Abstract of Symbolzer.voidsetGeometry(Expression geometry) Sets the expression used for styling.voidsetGeometryPropertyName(String geometryPropertyName) A shortcut to define the geometry expression as aPropertyNameTypically, features only have one geometry so, in general, the need to select one is not required.voidName of symbolizer; not always human readable.voidsetUnitOfMeasure(Unit<Length> uom) Defines a measure unit for the symbolizer.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Symbolizer
accept, accept
-
Field Details
-
name
-
description
-
geometry
-
unitOfMeasure
protected Unit<Length> unitOfMeasure -
options
-
-
Constructor Details
-
AbstractSymbolizer
protected AbstractSymbolizer() -
AbstractSymbolizer
public AbstractSymbolizer(String name, Description description, Expression geometry, Unit<Length> unitOfMeasure) -
AbstractSymbolizer
public AbstractSymbolizer(String name, Description description, String geometryPropertyName, Unit<Length> unitOfMeasure)
-
-
Method Details
-
getDescription
Description copied from interface:SymbolizerReturns the description of this symbolizer.- Specified by:
getDescriptionin interfaceSymbolizer- Returns:
- Description with usual informations used for user interfaces.
-
setDescription
Description copied from interface:SymbolizerTile and Abstract of Symbolzer.- Specified by:
setDescriptionin interfaceSymbolizer
-
getName
Description copied from interface:SymbolizerReturns a name for this symbolizer. This can be any string that uniquely identifies this style within a given canvas. It is not meant to be human-friendly. (The "title" property is meant to be human friendly.)- Specified by:
getNamein interfaceSymbolizer- Returns:
- a name for this style.
-
setName
Description copied from interface:SymbolizerName of symbolizer; not always human readable.Please consider getDescription().getTitle() as an alternative if presenting this symbolizer in a user interface.
- Specified by:
setNamein interfaceSymbolizer
-
setUnitOfMeasure
public void setUnitOfMeasure(Unit<Length> uom) Description copied from interface:SymbolizerDefines a measure unit for the symbolizer. This parameter is inherited from GML. Renderers shall use the unit to correctly render symbols.Recommended uom definitions are :
metrefootpixel
- Specified by:
setUnitOfMeasurein interfaceSymbolizer- Parameters:
uom- can be null, which indicates usage of the pixel unit.
-
getUnitOfMeasure
public Unit<Length> getUnitOfMeasure()Description copied from interface:SymbolizerReturns a measure unit. This parameter is inherited from GML. Renderers shall use the unit to correctly render symbols.Recommended uom definitions are :
metrefootpixel
- Specified by:
getUnitOfMeasurein interfaceSymbolizer- Returns:
- can be null. If the unit is null than we shall use a the pixel unit
-
getGeometry
Description copied from interface:SymbolizerThis defines the geometry to be used for styling.
The property is optional and if it is absent (null) then the "default" geometry property of the feature should be used.
Typically, features only have one geometry so, in general, the need to select one is not required.
The expression can also build a new geometry out of existing attributes or transform an existing geometry. For geometry transformations that do change the geometry locations or that make up geometries out of non geometric attributes it is advised that the Expression implements the SpatialTransformationFunction interface- Specified by:
getGeometryin interfaceSymbolizer
-
setGeometry
Description copied from interface:SymbolizerSets the expression used for styling. SeeSymbolizer.getGeometry()for further details.- Specified by:
setGeometryin interfaceSymbolizer
-
getGeometryPropertyName
Description copied from interface:SymbolizerReturns the name of the geometry feature attribute to use for drawing. May return null (or Expression.NIL) if this symbol is to use the default geometry attribute, whatever it may be. Using null in this fashion is similar to a PropertyName using the XPath expression ".".The content of the element gives the property name in XPath syntax. In principle, a fixed geometry could be defined using GML or operators could be defined for computing the geometry from references or literals. However, using a feature property directly is by far the most commonly useful method.
- Specified by:
getGeometryPropertyNamein interfaceSymbolizer- Returns:
- Geometry attribute name, or
nullto indicate default geometry
-
setGeometryPropertyName
Description copied from interface:SymbolizerA shortcut to define the geometry expression as aPropertyNameTypically, features only have one geometry so, in general, the need to select one is not required. Note: this moves a little away from the SLD spec which provides an XPath reference to a Geometry object, but does follow it in spirit.- Specified by:
setGeometryPropertyNamein interfaceSymbolizer
-
hasOption
Description copied from interface:SymbolizerDetermines if a vendor option with the specific key has been set on this symbolizer.- Specified by:
hasOptionin interfaceSymbolizer
-
getOptions
Description copied from interface:SymbolizerMap of vendor options for the symbolizer.Client code looking for the existence of a single option should use
Symbolizer.hasOption(String)- Specified by:
getOptionsin interfaceSymbolizer
-
hashCode
public int hashCode() -
equals
-