I am trying to get transparent parts of an 3-channel raster with NoData pixel values in GeoServer.

As suggested in here, I created alpha channel with pixels that have No Data Value (0) as a mask using GDAL `gdalwarp -srcnodata 0 -dstalpha input.tif output.tif` As a result I got 4-channel (RGB+alpha) where the pixels that previously were 0 now have 0 values in all four channels and those, that were > 0, in alpha channel have value 255. Also No Data Value is set to 0.

When I upload raster to GeoServer (v2.5.2) using QGIS plugin OpenGeo Explorer, instead of transparent pixels I get black pixels. What could be the problem? I have also tried without setting No Data Value without results.

Geoserver version: 2.5.2
Raster style:

   <?xml version="1.0" encoding="UTF-8"?>
   <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
<sld:Name>RGB raster</sld:Name>
  <sld:Name>RGB raster</sld:Name>
      <sld:Name>Single symbol</sld:Name>

Here is the request: request=GetMap&layers=jaun:ORO2&styles=&bbox=515813.19564,305943.471,516026.19564,306105.471&width=512&height=389&srs=EPSG:3059&format=application/openlayers&transparent=true

  • 2
    Can you share the following information: 1. version of geoserver 2. style you are using to show the data 3. GetMap format you are asking from GeoExplorer Simone.
    – simogeo
    Commented Oct 14, 2014 at 12:53
  • Updated qoestion text with requested information!
    – M_K
    Commented Oct 15, 2014 at 11:28
  • Basically all i need is for GeoExplorer to show trasparency where image alpha band pixel value is 0.
    – M_K
    Commented Oct 15, 2014 at 13:59

1 Answer 1


Ciao, the style you are using is stripping out the alpha band. Use the standard/default raster.sld style.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.