class ChannelSelection extends RasterSymbolizer
The ChannelSelection Symbolizer is used to style multi-spectral Rasters such as multi-band satellite imagery.
You can create a ChannelSelection for RGB channels:
def channel = new ChannelSelection("red", "green", "blue")
Or you can create a ChannelSelection for a gray scale channel:
def channel = new ChannelSelection("gray")
Or you can create a ChannelSelection for a RBG channels with specific ContrastEnhancement values:
def channel = new ChannelSelection() .red("red", new ContrastEnhancement("histogram", 0.35)) .green("green", new ContrastEnhancement("histogram", 0.45)) .blue("blue", new ContrastEnhancement("histogram", 0.55))
Fields inherited from class | Fields |
---|---|
class Symbolizer |
filterFactory, styleBuilder, styleFactory, styleOptions, title |
Type | Name and description |
---|---|
ContrastEnhancement |
blueContrastEnhancement The blue ContrastEnhancement |
java.lang.String |
blueName The blue channel name |
ContrastEnhancement |
grayContrastEnhancement The gray ContrastEnhancement |
java.lang.String |
grayName The gray channel name |
ContrastEnhancement |
greenContrastEnhancement The green ContrastEnhancement |
java.lang.String |
greenName The green channel name |
ContrastEnhancement |
redContrastEnhancement The red ContrastEnhancement |
java.lang.String |
redName The red channel name |
Constructor and description |
---|
ChannelSelection() Create a new ChannelSelection |
ChannelSelection(java.lang.String redName, java.lang.String greenName, java.lang.String blueName) Create a new ChannelSelection with red, green, and blue channel names |
ChannelSelection(java.lang.String grayName) Create a new ChannelSelection with a gray channel name |
ChannelSelection(Map map) Create a new ChannelSelection from named parameters. |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
apply(Symbolizer sym) Apply this Symbolizer to the GeoTools Symbolizer |
|
ChannelSelection |
blue(java.lang.String name, ContrastEnhancement contrastEnhancement) Set the blue channel name and optionally the blue ContrastEnhancement |
|
ChannelSelection |
gray(java.lang.String name, ContrastEnhancement contrastEnhancement) Set the gray channel name and optionally the gray ContrastEnhancement |
|
ChannelSelection |
green(java.lang.String name, ContrastEnhancement contrastEnhancement) Set the green channel name and optionally the green ContrastEnhancement |
|
protected void |
prepare(Rule rule) Prepare the GeoTools Rule by applying this Symbolizer |
|
ChannelSelection |
red(java.lang.String name, ContrastEnhancement contrastEnhancement) Set the red channel name and optionally the red ContrastEnhancement |
|
java.lang.String |
toString() The string representation |
Methods inherited from class | Name |
---|---|
class RasterSymbolizer |
apply, geometry, opacity, overlap, prepare, setGeometry, setOpacity, setOverlap, toString |
class Symbolizer |
and, apply, asSLD, asSLD, buildString, composite, createGeoToolsSymbolizer, getDefault, getDefault, getGeoToolsSymbolizers, getGtStyle, getSld, getTitle, plus, prepare, prepare, range, range, sortBy, sortBy, title, where, zindex |
The blue ContrastEnhancement
The blue channel name
The gray ContrastEnhancement
The gray channel name
The green ContrastEnhancement
The green channel name
The red ContrastEnhancement
The red channel name
Create a new ChannelSelection
Create a new ChannelSelection with red, green, and blue channel names
redName
- The red channel namegreenName
- The green channel nameblueName
- The blue channel nameCreate a new ChannelSelection with a gray channel name
grayName
- The gray channel nameCreate a new ChannelSelection from named parameters.
map
- A Map of named parameters.Apply this Symbolizer to the GeoTools Symbolizer
sym
- The GeoTools SymbolizerSet the blue channel name and optionally the blue ContrastEnhancement
name
- The blue channel namecontrastEnhancement
- The blue ContrastEnhancementSet the gray channel name and optionally the gray ContrastEnhancement
name
- The gray channel namecontrastEnhancement
- The gray ContrastEnhancementSet the green channel name and optionally the green ContrastEnhancement
name
- The green channel namecontrastEnhancement
- The green ContrastEnhancementPrepare the GeoTools Rule by applying this Symbolizer
rule
- The GeoTools RuleSet the red channel name and optionally the red ContrastEnhancement
name
- The red channel namecontrastEnhancement
- The red ContrastEnhancementThe string representation
Groovy Documentation