I have a geotiff file which contains three bands and the value is 'no-data' at the edge of the image:
However after published in geoserver, I got this:
Note the white background in the image, while I want it is transparent.
Is this possible?
update:
I use the following command gdal_translate -a_nodata 0 -of GTiff D:/01.tif D:/02.tif in qgis to translate the geotiff file.
When publish in geoserver I set the InputTransparentColor to 0:
And the default raster style in geoserver:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor>
<NamedLayer>
<Name>default_raster</Name>
<UserStyle>
<Title>Default Raster</Title>
<Abstract></Abstract>
<FeatureTypeStyle>
<Rule>
<Name>rule1</Name>
<Title>Opaque Raster</Title>
<Abstract>A raster with 100% opacity</Abstract>
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ChannelSelection>
<RedChannel>
<SourceChannelName>1</SourceChannelName>
</RedChannel>
<GreenChannel>
<SourceChannelName>2</SourceChannelName>
</GreenChannel>
<BlueChannel>
<SourceChannelName>3</SourceChannelName>
</BlueChannel>
</ChannelSelection>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>



FFFFFF. – BradHards Feb 12 '17 at 04:37FFFFFFit is auto changed by geoserver once I enter0for the field. – giser Feb 12 '17 at 07:14