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))
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
(java.util.Map map) Create a new ChannelSelection from named parameters. |
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 |
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() |
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