A ContrastEnhancement is a Symbolizer used to style Rasters by modifying the contrast.
You can create a ContrastEnhancement using the normalize method:
def c = new ContrastEnhancement("normalize")
Or you can create a ContrastEnhancement using the normalize histogram method and a gamma value:
def c = new ContrastEnhancement("histogram", 0.5)
| Type | Name and description |
|---|---|
Expression |
gammaValueThe gamma value |
java.lang.String |
methodThe method: Normalize or Histogram |
| Constructor and description |
|---|
ContrastEnhancement
(java.lang.String method, java.lang.Object gammaValue = null)Create a new ContrastEnhancement |
| Type | Name and description |
|---|---|
protected void |
apply(org.geotools.styling.Symbolizer sym)Apply this Symbolizer to the GeoTools Symbolizer |
protected org.geotools.styling.ContrastEnhancement |
createContrastEnhancement()Create a GeoTools ContrastEnhancement |
protected void |
prepare(org.geotools.styling.Rule rule)Prepare the GeoTools Rule by applying this Symbolizer |
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 gamma value
The method: Normalize or Histogram
Create a new ContrastEnhancement
method - The methodgammaValue - The gamma valueApply this Symbolizer to the GeoTools Symbolizer
sym - The GeoTools SymbolizerCreate a GeoTools ContrastEnhancement
Prepare the GeoTools Rule by applying this Symbolizer
rule - The GeoTools RuleThe string representation
Groovy Documentation