A Symbolizer that repeats a pattern. A hatch can be applied to linear and area geometries.
You can create a Hatch by specifying the name, Stroke, and size:
Or with named parameters:def hatch = new Hatch("times", new Stroke("wheat", 1.2, [5,2], "square", "bevel"), 12.2)
def hatch = new Hatch(size: 10, stroke: new Stroke("wheat",1.0), name: "slash")
Type | Name and description |
---|---|
Fill |
fill The Fill |
Expression |
name The name of the pattern (vertline, horline, slash, backslash, plus, times) |
Expression |
size The size |
Stroke |
stroke The Stroke |
Constructor and description |
---|
Hatch
(java.util.Map map) Create a new Hatch with named parameters. |
Hatch
(java.lang.Object name, Stroke stroke = new Stroke(, java.lang.Object size = 8) Create a new Hatch. |
Hatch
(java.lang.Object name, Fill fill, Stroke stroke, java.lang.Object size) Create a new Hatch with Fill and Stroke. |
Hatch
(java.lang.Object name, Fill fill, java.lang.Object size) Create a new Hatch with a Fill but no Stroke. |
Type | Name and description |
---|---|
protected void |
apply(org.geotools.styling.Symbolizer sym) Apply this Symbolizer to the GeoTools Symbolizer |
protected org.geotools.styling.Graphic |
createHatch() Create a GeoTools Graphic based on this Hatch |
protected void |
prepare(org.geotools.styling.Rule rule) Prepare the GeoTools Rule by applying this Symbolizer |
void |
setName(java.lang.Object name) Set the name of the pattern (vertline, horline, slash, backslash, plus, times) |
void |
setSize(java.lang.Object size) Set the size |
java.lang.String |
toString() The string representation |
Methods inherited from class | Name |
---|---|
interface org.geotools.styling.Symbolizer |
org.geotools.styling.Symbolizer#accept(org.geotools.styling.StyleVisitor), org.geotools.styling.Symbolizer#setName(java.lang.String), org.geotools.styling.Symbolizer#hasOption(java.lang.String), org.geotools.styling.Symbolizer#getOptions(), org.geotools.styling.Symbolizer#getDescription(), org.geotools.styling.Symbolizer#getDescription(), org.geotools.styling.Symbolizer#setDescription(org.opengis.style.Description), org.geotools.styling.Symbolizer#getGeometry(), org.geotools.styling.Symbolizer#setGeometry(org.opengis.filter.expression.Expression), org.geotools.styling.Symbolizer#setUnitOfMeasure(javax.measure.unit.Unit), org.geotools.styling.Symbolizer#getGeometryPropertyName(), org.geotools.styling.Symbolizer#setGeometryPropertyName(java.lang.String), org.geotools.styling.Symbolizer#getName(), org.geotools.styling.Symbolizer#accept(org.opengis.style.StyleVisitor, java.lang.Object), org.geotools.styling.Symbolizer#getUnitOfMeasure() |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The Fill
The name of the pattern (vertline, horline, slash, backslash, plus, times)
The size
The Stroke
Create a new Hatch with named parameters.
def hatch = new Hatch(size: 10, stroke: new Stroke("wheat",1.0), name: "slash")
map
- A Map of named parameters.Create a new Hatch.
def hatch = new Hatch("times", new Stroke("wheat", 1.2, [5,2], "square", "bevel"), 12.2)
name
- (vertline, horline, slash, backslash, plus, times)stroke
- A Strokesize
- The sizeCreate a new Hatch with Fill and Stroke.
def hatch = new Hatch("times", new Fill("blue"), new Stroke("wheat", 1.2, [5,2], "square", "bevel"), 12.2)
name
- (vertline, horline, slash, backslash, plus, times)fill
- A Fillstroke
- A Strokesize
- The sizeCreate a new Hatch with a Fill but no Stroke.
def hatch = new Hatch("times", new Fill("wheat"), 12.2)
name
- (vertline, horline, slash, backslash, plus, times)fill
- A Fillsize
- The sizeApply this Symbolizer to the GeoTools Symbolizer
sym
- The GeoTools SymbolizerCreate a GeoTools Graphic based on this Hatch
Prepare the GeoTools Rule by applying this Symbolizer
rule
- The GeoTools RuleSet the name of the pattern (vertline, horline, slash, backslash, plus, times)
name
- The name of the pattern (vertline, horline, slash, backslash, plus, times)Set the size
size
- The sizeThe string representation
Groovy Documentation