Hi there.
i tried to use the colorMap tags to give transparency in the nodata pixels:
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>raster</Name>
<UserStyle>
<Name>raster</Name>
<Title>Raster</Title>
<Abstract>A sample style for rasters, good for displaying
imagery</Abstract>
<FeatureTypeStyle>
<FeatureTypeName>Feature</FeatureTypeName>
<Rule>
<RasterSymbolizer>
<ColorMap type="ramp" extended="true">
<ColorMapEntry color="#000000" quantity="0.0" opacity="1.0"/>
<ColorMapEntry color="#737373" quantity="2.0" opacity="1.0"/>
<ColorMapEntry color="#666666" quantity="10.0" opacity="1.0"/>
<ColorMapEntry color="#595959" quantity="15.0" opacity="1.0"/>
<ColorMapEntry color="#4d4d4d" quantity="20.0" opacity="1.0"/>
<ColorMapEntry color="#404040" quantity="25.0" opacity="1.0"/>
<ColorMapEntry color="#333333" quantity="30.0" opacity="1.0"/>
<ColorMapEntry color="#ffffff" quantity="100.0" opacity="1.0"/>
</ColorMap>
<Opacity>1.0</Opacity>
<ChannelSelection>
<GrayChannel>
<SourceChannelName>1</SourceChannelName>
<ContrastEnhancement>
<Normalize/>
</ContrastEnhancement>
</GrayChannel>
</ChannelSelection>
<ContrastEnhancement>
<GammaValue>1</GammaValue>
</ContrastEnhancement>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
and the result was:
Now, the background color is perfect.
But, now the images are with very low quality.
Zoom in
Original:
Geoserver raster:
As you can see, with the "<ColorMap>" the nodata pixels disappear, but
pictures are affected.
I wounder how can it be done without quality image defect. The idea is to
maintain the image original quality.
Cumps,
D.Nunes
--
View this message in context: http://www.nabble.com/RasterSymbolizer-no-data-pixels-tp21125883p21125883.html
Sent from the GeoServer - User mailing list archive at Nabble.com.