A Symbolizer for linear geometries that consists of a color and a width.
You can create a Stroke with a color and width:
 def shape = new Shape("#ff0000", 0.25)
 
 Or with named parameters:
 def stroke = new Stroke(width: 1.2, dash: [5,2], color: "#ff00ff", opacity: 0.75)
| Fields inherited from class | Fields | 
|---|---|
class Symbolizer | 
                            filterFactory, styleBuilder, styleFactory, styleOptions | 
                        
| Type | Name and description | 
|---|---|
private Expression  | 
                            capThe line cap (butt, round, square)  | 
                        
private Expression  | 
                            colorThe color in hexadecimal format (#00FF00)  | 
                        
private List  | 
                            dashThe dash pattern.  | 
                        
private Hatch  | 
                            hatchThe Hatch  | 
                        
private Expression  | 
                            joinThe line join (miter, round, bevel)  | 
                        
private Expression  | 
                            opacityThe opacity (0: transparent - 1 opaque)  | 
                        
private Expression  | 
                            perpendicularOffsetThe perpendicular offset  | 
                        
private Shape  | 
                            shapeThe Shape for spaced graphics  | 
                        
private Expression  | 
                            widthThe width (1, 2, 5, ect...)  | 
                        
| Type Params | Return Type | Name and description | 
|---|---|---|
 | 
                            protected void | 
                            apply(Symbolizer sym)Apply this Symbolizer to the GeoTools Symbolizer 
  | 
                        
 | 
                            protected Stroke | 
                            createStroke()Create a GeoTools Stroke from this GeoScript Stroke 
  | 
                        
 | 
                            Stroke | 
                            hatch(java.lang.Object name, Stroke stroke, java.lang.Object size)Add a Hatch pattern to this Stroke 
 
  | 
                        
 | 
                            Stroke | 
                            perpendicularOffset(java.lang.Object offset)Set the perpendicular offset 
 
  | 
                        
 | 
                            protected void | 
                            prepare(Rule rule)Prepare the GeoTools Rule by applying this Symbolizer 
  | 
                        
 | 
                            void | 
                            setCap(java.lang.Object cap)Set the line cap(butt, round, square) 
  | 
                        
 | 
                            void | 
                            setColor(java.lang.Object color)Set the color 
  | 
                        
 | 
                            void | 
                            setJoin(java.lang.Object join)Set the line join(miter, round, bevel) 
  | 
                        
 | 
                            void | 
                            setOpacity(java.lang.Object opacity)Set the opacity (0: transparent - 1 opaque) 
  | 
                        
 | 
                            void | 
                            setPerpendicularOffset(java.lang.Object offset)Set the perpendicular offset 
 
  | 
                        
 | 
                            void | 
                            setWidth(java.lang.Object width)Set the width 
  | 
                        
 | 
                            Stroke | 
                            shape(Shape shape)Add a Shape to this Stroke for creating spaced graphic symbols 
 
  | 
                        
 | 
                            java.lang.String | 
                            toString()The string representation 
  | 
                        
| Methods inherited from class | Name | 
|---|---|
class Symbolizer | 
                            and, apply, asSLD, asSLD, buildString, composite, createGeoToolsSymbolizer, getDefault, getDefault, getGeoToolsSymbolizers, getGtStyle, getSld, plus, prepare, prepare, range, range, sortBy, sortBy, where, zindex | 
                        
The line cap (butt, round, square)
The color in hexadecimal format (#00FF00)
The dash pattern. Odd items specify length in pixels of the dash. Even items specify spaces.
The Hatch
The line join (miter, round, bevel)
The opacity (0: transparent - 1 opaque)
The perpendicular offset
The Shape for spaced graphics
The width (1, 2, 5, ect...)
Create a new Stroke.
 def stroke = new Stroke("#ff0000", 0.25, [5,2], "round", "bevel")
  color -  The colorwidth -  The widthdash -  The dash patterncap -  The line cap (round, butt, square)join -  The line join (mitre, round, bevel)Create a new Stroke with named parameters.
def stroke = new Stroke(width: 1.2, dash: [5,2], color: "#ff00ff", opacity: 0.75)
map -  A Map of named parameters.Apply this Symbolizer to the GeoTools Symbolizer
sym -  The GeoTools SymbolizerCreate a GeoTools Stroke from this GeoScript Stroke
Add a Hatch pattern to this Stroke
name -  The pattern namestroke -  The Strokesize -  The sizeSet the perpendicular offset
offset -  The offsetPrepare the GeoTools Rule by applying this Symbolizer
rule -  The GeoTools RuleSet the line cap(butt, round, square)
cap -  The line capSet the color
color -   The color (#ffffff, red)Set the line join(miter, round, bevel)
join -  The line joinSet the opacity (0: transparent - 1 opaque)
opacity -  The opacity (0: transparent - 1 opaque)Set the perpendicular offset
offset -  The offsetSet the width
width -  The widthAdd a Shape to this Stroke for creating spaced graphic symbols
shape -  The ShapeThe string representation
Groovy Documentation