A Symbolizer for point geometries that consists of a color and size.
You can create a new Shape with a color, size, type, opacity, and rotation angle:
Or with named parameters:def shape = new Shape("#ff0000", 8, "circle", 0.55, 0)
def shape = new Shape(type: "star", size: 4, color: "#ff00ff")
Fields inherited from class | Fields |
---|---|
class Symbolizer |
filterFactory, styleBuilder, styleFactory, styleOptions |
Type | Name and description |
---|---|
java.lang.Object |
anchorPoint The anchor point |
Expression |
color The color (#ff000, blue, [255,255,0]) |
java.lang.Object |
displacement The displacement |
Expression |
opacity The opacity (0: transparent - 1 opaque) |
Expression |
rotation The rotation angle (0-360 or a geoscript.filter.Function) |
Expression |
size The size (6, 10, 12, ect...) |
Stroke |
stroke The Stroke |
Expression |
type The type (circle, square, triangle, star, cross, or x). |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
apply(Symbolizer sym) Apply this Symbolizer to the GeoTools Symbolizer |
|
protected Graphic |
createGraphic(Symbolizer sym) Create a GeoTools Graphic from The GeoTools Symbolizer. |
|
protected Mark |
createMark() Create a GeoTools Mark from this Shape |
|
protected void |
prepare(Rule rule) Prepare the GeoTools Rule by applying this Symbolizer |
|
void |
setAnchorPoint(java.util.List anchorPoints) Set the anchor points (List of two values between 0 and 1) |
|
void |
setColor(java.lang.Object color) Set the color |
|
void |
setDisplacement(java.util.List displacements) Set the displacement (List of two values between 0 and 1) |
|
void |
setOpacity(java.lang.Object opacity) Set the opacity (0: transparent - 1 opaque) |
|
void |
setRotation(java.lang.Object rotation) Set the rotation angle (0-360 or a geoscript.filter.Function) |
|
void |
setSize(java.lang.Object size) Set the size |
|
void |
setType(java.lang.Object type) Set the type (circle, square, triangle, star, cross, or x). |
|
Shape |
stroke(java.lang.Object color = "#000000", java.lang.Object width = 1, java.lang.Object dash = null, java.lang.Object cap = null, java.lang.Object join = null) Add a Stroke to this Shape |
|
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 anchor point
The color (#ff000, blue, [255,255,0])
The displacement
The opacity (0: transparent - 1 opaque)
The rotation angle (0-360 or a geoscript.filter.Function)
The size (6, 10, 12, ect...)
The Stroke
The type (circle, square, triangle, star, cross, or x).
Create a new Shape
Create a new Shape with named parameters.
def shape = new Shape(type: "star", size: 4, color: "#ff00ff")
map
- A Map of named parameters.Create a new Shape.
def shape = new Shape("#ff0000", 8, "circle", 0.55, 0)
color
- The colorsize
- The sizetype
- The typeopacity
- The opacity (0-1)angle
- The angle or rotation (0-360)Apply this Symbolizer to the GeoTools Symbolizer
sym
- The GeoTools SymbolizerCreate a GeoTools Graphic from The GeoTools Symbolizer.
sym
- The GeoTools SymbolizerCreate a GeoTools Mark from this Shape
Prepare the GeoTools Rule by applying this Symbolizer
rule
- The GeoTools RuleSet the anchor points (List of two values between 0 and 1)
anchorPoints
- A List of two values between 0 and 1Set the color
color
- The color (#ffffff, red)Set the displacement (List of two values between 0 and 1)
displacement
- A List of two values between 0 and 1Set the opacity (0: transparent - 1 opaque)
opacity
- The opacity (0: transparent - 1 opaque)Set the rotation angle (0-360 or a geoscript.filter.Function)
rotation
- The rotation angle (0-360 or a geoscript.filter.Function)Set the size
size
- The sizeSet the type (circle, square, triangle, star, cross, or x).
type
- The type (circle, square, triangle, star, cross, or x).Add a Stroke to this Shape
color
- The colorwidth
- The widthdash
- The dash patterncap
- The line cap (round, butt, square)join
- The line join (mitre, round, bevel)The string representation
Groovy Documentation