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 | 
| Type | Name and description | 
|---|---|
| ContrastEnhancement | blueContrastEnhancementThe blue ContrastEnhancement | 
| java.lang.String | blueNameThe blue channel name | 
| ContrastEnhancement | grayContrastEnhancementThe gray ContrastEnhancement | 
| java.lang.String | grayNameThe gray channel name | 
| ContrastEnhancement | greenContrastEnhancementThe green ContrastEnhancement | 
| java.lang.String | greenNameThe green channel name | 
| ContrastEnhancement | redContrastEnhancementThe red ContrastEnhancement | 
| java.lang.String | redNameThe 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
                                (java.util.Map map)Create a new ChannelSelection from named parameters. | 
| Type Params | Return Type | Name and description | 
|---|---|---|
|  | protected void | apply(org.geotools.styling.Symbolizer sym)Apply this Symbolizer to the GeoTools Symbolizer | 
|  | ChannelSelection | blue(java.lang.String name, ContrastEnhancement contrastEnhancement = null)Set the blue channel name and optionally the blue ContrastEnhancement | 
|  | ChannelSelection | gray(java.lang.String name, ContrastEnhancement contrastEnhancement = null)Set the gray channel name and optionally the gray ContrastEnhancement | 
|  | ChannelSelection | green(java.lang.String name, ContrastEnhancement contrastEnhancement = null)Set the green channel name and optionally the green ContrastEnhancement | 
|  | protected void | prepare(org.geotools.styling.Rule rule)Prepare the GeoTools Rule by applying this Symbolizer | 
|  | ChannelSelection | red(java.lang.String name, ContrastEnhancement contrastEnhancement = null)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, plus, prepare, prepare, range, range, sortBy, sortBy, where, zindex | 
| 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 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