Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a bit of a beginner question I guess but I just can't find a clear answer anywhere... I have a projected satellite image (warped via gdal) and would like to set the no data pixels to a transparent value so that when the wms layer of my (image) coverage is added on my map only the projected image is displayed (and not the balck area around). Is it in the sld for my layer? is it in the wms parameters? do I need a rgba image format? etc... Any pointers would be highly appreciated! Thanks in advance. Thomas

share|improve this question
up vote 3 down vote accepted

You need to add a ColorMap entry for the no data value in the SLD file that is set to be transparent. See for more details.

share|improve this answer
Thanks for the answer. Can you develop a bit? All my attempts to use ColorMap fail. This is typically what I am doing: create a raster style with the ColorMap with <ColorMap> <ColorMapEntry color="#000000" quantity="1" opacity="0"/> </ColorMap> And then I apply it to the raster layer. – Thomas Jun 7 '11 at 7:37
OK I made it work with the following: <ChannelSelection> <RedChannel> <SourceChannelName>1</SourceChannelName> </RedChannel> </ChannelSelection> <ColorMap> <ColorMapEntry color="#000000" quantity="1" opacity="0"/> <ColorMapEntry color="#000000" quantity="2" opacity="1"/> <ColorMapEntry color="#FFFFFF" quantity="256" opacity="1"/> – Thomas Jun 7 '11 at 8:24
note: for multiband images this method does not work. See post… – xandriksson Jun 26 '13 at 11:31

This work form me. (Geoserver 2.8.2, GeoTiff, GrayBand).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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